Skip to main content

GTM multiple triggers

Comments

2 comments

  • 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,
    Spas

    0
  • Robert Reček

    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.