GTM multiple triggers
We've been following the guide on implementing with GTM (https://support.cookiebot.com/hc/en-us/articles/360009192739-Google-Tag-Manager-and-Automatic-cookie-blocking)
But when we have tags with existing trigger to run on "All pages". When we have both triggers it fires before the consent is given.
And in our tags with triggers such as: "Link click - 'tel' Or 'mailto' protocol", these will also be triggered on "cookie_consent_statistics". Is there a way we can listen after both and not only if one trigger is true? Like going from an "or"- to "and"-statement.
-
Hi Jesper,
From the screenshot above I can see that you are using both 'cookie_consent_statistics' and 'All Pages' triggers. But the cookie_consent_statistics event replaces the "All Pages" event. Therefore in this case using both means that the tag will always fire.
You could also pair an event like click with a custom variable that checks the consent level using trigger groups. For example:function() {
return Cookie.consent.statistics.toString();
}Please note that then all conditions must be true. So you would need to be sure to use AND not OR.
Regards,
Spas0 -
Hello Spas,
so it means, I have to create 3x trigger for "All Pages" and so on? Like for example trigger group called "All Pages - Statistics" where Icombine All pages trigger with your "cookie_consent_statistics" And this trigger will be used for tags that should be fired on al lpages but only for those who agreed with statistical Cookies? ...And similar: All Pages - Preferences" and "All Pages - Marketing". This is the only way to add additional condition for using cookie preference?
Thanks
Robert
0
Please sign in to leave a comment.
Comments
2 comments