Google Tag Manager and Automatic cookie blocking




  • Avatar

    When would you use this installation mode versus the other one outlined here:

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

    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?

    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? 

    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 "" 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?

    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

    function CookiebotCallback_OnAccept() {
    if (Cookiebot.consent.preferences)
    if (Cookiebot.consent.statistics)
    if (

    Comment actions Permalink

Please sign in to leave a comment.