TecArt / grav-plugin-tecart-cookie-manager

Cookie Banner Plugin for Grav CMS with extended Admin Panel Manager and Cookie Settings options. Banner based on Cookie Consent JavaScript API by Osano.
Other
12 stars 7 forks source link

By default cookies are not blocked, deny button doesn't remove cookies #8

Closed 01Kuzma closed 2 years ago

01Kuzma commented 2 years ago

Hi, it seems that there is a bug. I've made two categories: "system cookies" and "analytics + ads".

The first category has opt-in for all cookies set to hide. The second category has opt-in for all cookies set to show.

I've inserted the code from the Google Tag Manager in <scripts> area. My GTM container inserts: GA, Google AdWords and Facebook Pixel. Script Settings: Default (script included or not) set to not active. Here I provided the screenshot: image

The problem: once I visit the page all cookies are allowed and not blocked! If I navigate to banner settings the script category is active! While it should be turned off. Then I click deny button, but the status of the script is still allowed: image Then manually I untick opt-in checkbox and press save settings button, and as the result, the vast majority of marketing cookies are deleted, system cookies still exist, but the one cookie from GA still not removed _ga_XXX image

ChristianaHoJo commented 2 years ago

Hi Kuzma,

to which category do the scripts belong? If category with option visible is choosen, then the toggler category is output, set to "on" and all scripts/cookies of this category are initially activated.

grafik

The setting is the same effect as if you would set the toggle in frontend for all cookies of this category to active and the scripts are treat as necessary, so deny is not allowed. grafik

01Kuzma commented 2 years ago

@ChristianaHoJo , thank you for your reply! Well, I will demonstrate with screenshots, it will be easier. I want to achieve a simple cookie blocker with two categories. 1). Required cookies - session etc. As they are internal cookies we are unable to block them, so it's a blank screen just for visitor information purposes. 2). GTM script, which should be blocked by default, turned on if a visitor press Allow or choose it from banner settings and clicks save settings.

Here are my settings: 1). categories image 2). scripts image

So, once I visit the page from a private mode all cookies are not blocked (the internal cookie names here is in Lithuanian, not in English, sorry for that) image

The settings in banner are on by default: image

If I switch off two checkboxes, press save, after the refresh only the last checkbox is off, but cookies are also loaded. image

And the last option - I press Decline button, cookies are not deleted.

Something is bad in my config?

P.S. cache and assets modification are turned on

ChristianaHoJo commented 2 years ago

image This setting means, that all scripts of this category are shown, no matter what setting single elements below this category have. In this case they are all shown

01Kuzma commented 2 years ago

How can I turn it off by default within provided settings?

ChristianaHoJo commented 2 years ago

You can turn it off when turn off "show" in category settings. In category you have the master setting for all. If turn it to hide you can set own setting for each script.

01Kuzma commented 2 years ago

@ChristianaHoJo, thank you! It seems that it's what I'm looking for! I will test it a little bit further. Maybe it's off-topic and relates to how the GA works, but I think it should be mentioned in the GDPR era :) After a user Clicks Accept all GA, ADS and other cookies are loaded, then the user clicks the Decline. After it all mentioned cookies are deleted, but a particular cookie with it's unique ID still exists - _ga_XXX. Have you observed such behaviour?

ChristianaHoJo commented 2 years ago

I hope you'll get it work now. :-) We use the plugin ourselves (www.tecart.de) and our editors say it works as expected. However, our marketing department has separated from the Google Tag Manager, which is why I have no current information.