Closed davidecesarano closed 3 years ago
Hi @davidecesarano,
the plugin saves its changes after the execution of the onAccept/onChange method.
In your specific example — if I accept the cookie consent — the following code is executed:
gtag('consent', 'update', {
'ad_storage': 'granted',
'analytics_storage':'granted'
});
Which — on my end at least — throws the following error gtag is not defined
, blocking the rest of the script.
You can easily verify this if you try to comment the code block above. Make sure you are properly loading gtag
.
If you have trouble configuring third party scripts, you can use an alternative/easier way of loading them, as showed in the second demo and here: #64
Hi @orestbida,
thank you for reply.
gtag is defined. In the console I don't get any errors (ga is included in the head tag, I use google consent mode).
<script async src="https://www.googletagmanager.com/gtag/js?id=xxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('set', 'ads_data_redaction', true);
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500
});
gtag('js', new Date());
gtag('config', 'xxx');
</script>
Just re-tried it! Yes, there is indeed an issue with the revision option! Expect a fix very soon!
Hello,
if I understand correctly, the revision is used to "signal" a change. Is it correct to say that if I change the "revision" parameter in the settings it will also change in the cookie? Although I have changed the revision parameter, the box always appears and if I click on "accept all" the "revision" value in the "cc_cookie" remains the old one.
When you refresh the page and "accept all", the revision property in "cc_cookie" does not change. Then, updating the page again, the box appears again.
PS Sorry for my English :)