I want to benefit from the GTM consent overview and consent settings on tags. I want to use the Tag Manager approach as documented here : https://developers.google.com/tag-platform/devguides/consent?tab=tag-manager (no template, no CMP)
The init works great and my tags can be triggered or not depending on the initial values I set in the default consent event.
gtag('consent', 'default', {
'ad_storage': 'granted',
'functionality_storage': 'denied'
});
However I would like to be able to "update" the consent as documented, but later...
The problem: After sending and "udpate" consent event, my tags that depend on the corresponding constent types are not fired...
gtag('consent', 'update', {
'ad_storage': 'granted',
'functionality_storage': 'granted'
});
I expect all my Tags that have specific consent settings (eg functionality_storage) to fire when the consent is updated, but they are not.
If the update is done "just after" the init, it works. But if the update is done later when the user clicks on a pref button, it's too late.
My tags have the "All Pages" trigger, with a simple "Requires additional consent" setting.
Note: I'm storing the consent prefs in a cookie, and since I'm initializing the default consent values from the cookie, the next load of the page will take the prefs into account, however I'm not sure this is the intended design?
Or maybe it is, when the user has set his prefs, a new page just needs to be reloaded so that the consent settings are properly set up early enough? A way to restart the GTM without reloading the page? or force the eval of the tags again?
Thanks for any help!