Closed edgarhuber closed 2 years ago
Hi @edgarhuber,
the scripts with data-category
(and data-cookiecategory
) are working fine in all 3 demos, as far as I can tell. They are only enabled if the analytics category is accepted.
Another issue I came across is that in your demo_gtm (2.8.6 & 3.0-beta) the modal doesn't close after I change the consent status and click on a button. Instead I have to click two times
There is an issue in this demo. Inside the onChange
callback, you're executing the following code where the cc
variable is not defined:
if (!cc.acceptedCategory('analytics')) {
typeof gtag === 'function' && gtag('consent', 'update', {
'analytics_storage': 'denied'
});
}
CookieConsent.acceptedCategory
; cc
name:
const cc = CookieConsent;
Edit: Looks like this issue is present in the 2nd demo. Will fix it later.
Updated the example with the recommended Google Consent Mode, for a more granular control.
Hi @edgarhuber,
the scripts with
data-category
(anddata-cookiecategory
) are working fine in all 3 demos, as far as I can tell. They are only enabled if the analytics category is accepted.Thank you, Orest. I think the mistake lies in Google's Tag Assistant Browser Plugin where the Tag is shown as active whether it's activated or not. But when I check the browser for cookies the Analytics 4 tag is working perfectly with your cookie consent as it should. I guess, Tag Assistant is the wrong tool to check if the consent is working or not. I think, it's even outdated.
Thanks also for updating the example and helping me out!
Hello Orest, first of all i have to give you props for this great project! Thank you very much!
It seems as if the Google Analytics 4 Script can't be blocked. It's loading although I've used the described way to implement and block it and it's shown in the Google Tag Assistant different to the Google Tag Manager Script in your Demo Files.
I've tried cookieconsent-2.8.6 and cookieconsent-3.0-beta.
That's 2.8.6:
And that's 3.0-beta:
Examples (will be deleted soon): Analytics script is loading without consent: https://edgarunger.com/cookieconsent-2.8.6/demo/demo_gtm/index.html Analytics script is loading without consent: https://edgarunger.com/cc3/demo/demo_gtm/index.html Google Tag Manager script is loading correctly after consent is given: https://edgarunger.com/cc3/demo/demo_basic/index.html
I can't find my mistake. I don't know, whether it has something to do with Google Consent Mode or not.
Another issue I came across is that in your demo_gtm (2.8.6 & 3.0-beta) the modal doesn't close after I change the consent status and click on a button. Instead I have to click two times. I think, this behaviour is not intended, isn't it?