Google Tag Manager and Automatic cookie blocking

Follow

Comments

5 comments

  • Avatar
    Mhamilton

    When would you use this installation mode versus the other one outlined here: https://support.cookiebot.com/hc/en-us/articles/360003793854

    We are having issues of Pardot tracking working with Cookiebot -- will changing the deployment help with that?

    6
    Comment actions Permalink
  • Avatar
    Henrik Söderlund

    Great guide, thanks! With this implementation I found that the GTM Preview & Debug Mode stops working as it seems to block the GTM preview JS library from loading in the browser. What do you recommend?

    1
    Comment actions Permalink
  • Avatar
    Roel Cuijpers

    Same issue :( 

     

    Plus when i agree with the cookies and go back to the page with the video, it doesnt show up anymore? 

    0
    Comment actions Permalink
  • Avatar
    Yoannis Jamar

    As pointed out above, this setup seems to break GTM's "Preview and Debug mode". The debug panel seems to open, but it remains an empty box.

    In the browser's dev-tools, it seems the loading of the "https://tagmanager.google.com/debug/debuguiApp-bundle.js" script is cancelled, and I am guessing this is due to Cookiebot's automatic blocking behaviour?

    Since that script is loaded by GTM behind the scenes, it is not possible to allow it with the `data-cookieconsent="ignore"` attribute. Is there any other way to add exceptions to Cookiebot's automatic blocking ? Or can automatic blocking with GTM be implemented in another way, that does not break the preview and debug mode?

    3
    Comment actions Permalink
  • Avatar
    Matthew Shepherd

    Using this implementation as far as I can tell only fires your tags after the consent dialog is submitted (only on the first page the consent is provided on). In my tests, if you set your cookie preferences and then navigate to another page the cookie_consent_ events don't fire. Am I missing something?

    I got around this by adding the following code after my cookiebot script on each page

    <script>
    function CookiebotCallback_OnAccept() {
    if (Cookiebot.consent.preferences)
    dataLayer.push({'event':'cookie_consent_preferences'});
    if (Cookiebot.consent.statistics)
    dataLayer.push({'event':'cookie_consent_statistics'});
    if (Cookiebot.consent.marketing)
    dataLayer.push({'event':'cookie_consent_marketing'});
    }
    </script>


    0
    Comment actions Permalink

Please sign in to leave a comment.