You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ahhh - so the feedback we've had from various SEO agencies, is that you have to load gtag regardless, it's weird, we've spent quite a while going back and forth trying to work out exactly what Google want here.
What happens though, is right after the initialisation of gtag, we set the permissions for consent for tracking, and by default, if no cookies are set, it should set the consent to denied for everything:
I think this came about because of European GDPR to be honest!
I'm not an SEO expert by any means, so we've been driven by the SEO agencies that we work with, based in the UK, EU and other countries (US etc) - and this seems to be the approach they all recommend, so I would assume so?
As for the nocache, I'm actually not sure - we tend to half cache most of our sites - but on the ones where it is full measure, I haven't wrapped it and it seems to work as it should. I reckon just give it a go without the nocache and see how it behaves - as it's mainly JS driven it should be fine either way!
If not - just pop another issue together and we'll have a nosey!
Activity
Alt-Ben commentedon May 8, 2025
Hey @stuartcusackie!
Weird! How are you loading the tag in? It's not cached etc is it?
Also - does it do it in private browsing (just trying to rule out anything we may have missed in cookie states).
stuartcusackie commentedon May 8, 2025
Hi @Alt-Ben!
Alt-Ben commentedon May 8, 2025
Hey @stuartcusackie!
Ahhh - so the feedback we've had from various SEO agencies, is that you have to load gtag regardless, it's weird, we've spent quite a while going back and forth trying to work out exactly what Google want here.
What happens though, is right after the initialisation of gtag, we set the permissions for consent for tracking, and by default, if no cookies are set, it should set the consent to denied for everything:
Alt-Cookies-Addon/resources/js/alt-cookies-init.js
Line 19 in 13843b8
Hopefully that makes sense - there's more chat about it here: https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#upgrade-consent-v2
Basically, it'll init the gtag function, but then only use it to deny consent from the off, until a user consents.
Is that okay?
stuartcusackie commentedon May 8, 2025
Oh I see! And do you know if this is an acceptable approach for European GDPR?
One more question if you don't mind, is there any need to wrap this tag in nocache when using full measure static caching?
Thanks for your help!!
Alt-Ben commentedon May 8, 2025
I think this came about because of European GDPR to be honest!
I'm not an SEO expert by any means, so we've been driven by the SEO agencies that we work with, based in the UK, EU and other countries (US etc) - and this seems to be the approach they all recommend, so I would assume so?
As for the nocache, I'm actually not sure - we tend to half cache most of our sites - but on the ones where it is full measure, I haven't wrapped it and it seems to work as it should. I reckon just give it a go without the nocache and see how it behaves - as it's mainly JS driven it should be fine either way!
If not - just pop another issue together and we'll have a nosey!