-
Enhancing Consent Mode in Google Analytics 4: Updating Status and Triggering Tags
Hey folks, I’m in need of some advice or a solution around
GA4 Consent Mode
.So here’s the thing: a couple of CMS systems have rolled out their own
Consent Plugins
. Yet, like with everything, there’s the good and the bad. These plugins do a solid job of blocking cookies and scripts – until they get that all important permission from the user. Once the green light is given, I’ve been attempting to update tags using this tasty piece of JS code:<script> gtag('consent', 'update', { 'ad_storage': 'granted', 'analytics_storage': 'granted' }); </script>
Unfortunately, it’s not always as smooth as butter, and this approach has hit some bumps in the road – it seems like consent isn’t always being updated properly. But the real brain-teaser happens with non-Google Tags.
The culprit? The Facebook tag. Despite setting the rule for “Require additional consent for tag to fire to
ad_storage
“, once the storage status is updated in the Consent layer, the FB tag isn’t firing as it should. It gives me the impression that the updating process should be happening earlier…So, if any of you have some nuggets of wisdom, an alternative JS solution, or any thoughts at all – toss them my way, I’d really appreciate it. Check the attached image for a clearer picture of what’s going on.
Log in to reply.