GTM Preview & Debug mode

Comments

6 comments

  • Official comment
    Avatar
    Richard van der Velde

    Hi T. Hinze,

    The Cookiebot CMP tag doesn't (and can't) affect events or or triggers in Google Tag Manager. It creates its own events and pushes these to the dataLayer, which allows triggers to be created that fire based on the consent level. Existing events aren't affected by this and the Cookiebot CMP tag can't create, edit, or delete triggers.

    If you would like us to check your trigger configuration, to see if anything looks unusual, feel free to send screenshots of your triggers to support@cookiebot.com 

    Comment actions Permalink
  • Hi Jelmer, 

    This is actually a common issue with Google Tag Manager. I happens because Cookiebot pushes events to the dataLayer from outside of GTM. Since GTM doesn't understand this, it thinks you're referencing to non-existing events, which causes the issue.
    Unfortunately, there is not really anything Cookiebot can do about it. 

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    T. Hinze

    Hello,

    we need a solution or your help to fix this issue - or create a workaround.

    I have create a trigger that looks for "clicks on links". I think the CookieBot CMP (short ccmp) break this GTM event, so all my triggers are broken.

    I need your help to fix this, because GTM implementation is set by Google and cant be modify.
    And also I think you should know how GTM works and in this case you should create the ccmp compatible with GTM.

    But now the problem exists and have to be resolve.

    Beste regards

     

    0
    Comment actions Permalink
  • Avatar
    T. Hinze

    Maybe, but after I add CookieBot to my page and my GTM container - all custom trackings stop working.

    A simple example:
    A simple custom trigger "on all clicks" fires an "Test" tag.

    a) no CookieBot
    On page and in GTM CookieBot isnt use.
    I make a click on page -> event appears in Analytics

    b) with CookieBot
    I add script on page and activate CookieBot tag in GTM. 
    On page I accept the statistics option in consent tool.
    The page calls appears in Analytics triggered by cookie_consent_statistics event.
    But the simple "Test" tag wasnt fired.

    Why or how to modify the Test tag or trigger to works?

    0
    Comment actions Permalink
  • Avatar
    T. Hinze

    Now I want explain my problem with more details.

    My example setup in GTM:

    A) custom variable "cookie_consent_statistics_is_set"
    If '|statistics|' is set in {{CookieBot CMP State}} , then this variable return true. Otherwise false.

    B) custom trigger "Linkedin-links clicked" for clicks on linkedin-links
    trigger-type "any link" and condition {{Click URL}} containes 'linkedin.com' AND {{cookie_consent_statistics_is_set}}is true.

    C) custom event tag "Link to linkedin clicked"
    Tag-type : Universal Analytics, triggered by "Linkedin-links clicked"

    D) the tag "Cookiebot CMP"
    This tag is set with the Cookiebot ID and I set the priority to 999999 - to force proccessed this tag at very first.
    The other tags in GTM have no priority and should be triggered even after the Cookiebot tag.

    E) default "Analytics" tag
    The normal Universal Analytics tag, with type "pageview" and triggered by the Cookiebot event "cookie_consent_statistics".

    The E)-tag is fired correctly, but my C)-tag will not be fired, if I click on the linkedin-link. Without Cookiebot - the E)-tag will be fired.

    Why doesnt works the custom tag/trigger then the Cookiebot tag is enabled?

    0
    Comment actions Permalink
  • Hi T. Hinze,

    Going through the issue and information you have published above in your post we can conclude that your trigger group doesn't work and this is the reason why you receive an error and all custom trackings stop working. 
    You would need to create custom variables to check the consent state, and pair it with the event that fires the trigger. Here's how that works:To set a condition, which can be paired with an event, should be created three custom Javascript variables
    Cookiebot.consent.preferences

    function() {
      return Cookiebot.consent.preferences.toString()
    }
    Cookiebot.consent.statistics
    function() {
      return Cookiebot.consent.statistics.toString()
    }
    Cookiebot.consent.marketing
    function() {
      return Cookiebot.consent.marketing.toString()
    }
    If this variable returns true at the time the event it's paired with occurs, the trigger fires.
    Here's an example of a simple Trigger Group for a tag which should ONLY fire, if an element is clicked with an id attribute with the value "submit", AND if consent has been given for statistical cookies: 
    Click ID equals submit
    Cookiebot.consent.statistics equals true (edited) 

    Hope this information is helpful for solving your problem, please do not hesitate to write us back in case of any other issue.

    Regards,
    Spas
    0
    Comment actions Permalink

Please sign in to leave a comment.