Skip to main content

Cookiebot and Google Consent Mode



  • Vadim Miheev

    Is it compatible with manual Cookie-blocking mode?
    Is there a way to check that the mechanism has started working correctly?

  • Vadim Miheev

    Answers for my own questions)

    1. Yes, it works in manual mode.
    2. You can check it through Chrome DevTools - If everything works correctly, then cookies associated with GA will not be created within the website domain until consent to the use of statistical cookies is obtained.
  • Gerald

    What is the basis for the Google Consent Mode? The privacy and personalisation settings in my Google account?

    Are you sure that, if analytics_storage='denied', the GDPR "allows" Cookieless pings that will be sent to Google Analytics for basic measurement and modeling purposes?



  • Vadim Miheev

    If this data is not personalized, then why not? 

  • Ferenc

    Hey, this article somewhat contradicts the other, because this forgets to mention the important fact that all GA scripts require the new attribute:



  • Sebas Reinders

    Hi Brian,

    Thanks for the detailed explanation. However, every time I insert this piece of code above my GTM snippet in WordPress it stops every type of tracking. No single pageview is tracked as soon as I apply this. Even when I accept all cookies in the banner. My google product-related tags (GA, Google Ads, etc.) in GTM are set-up with an "all pages" trigger. Do you know what goes wrong here?

    <!-- Consent Mode -->
    <script data-cookieconsent="ignore"> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('consent', 'default', { 'ad_storage': 'denied', 'analytics_storage': 'denied', 'wait_for_update': 500 }); gtag('set', 'ads_data_redaction', true); </script>
    <!-- End Consent Mode -->

  • Olivier Baudoux

    Hello there,

    I have the EXACT same issue than Sebas Reinders.  Tags & cookies behave as expected, but as soon as I add the consent mode script above GTM (Wordpress website), Google Analytics (both UA & GA4, all pages trigger) stops tracking anything.  I'm 100% sure I did exactly what is mentioned in the different tutorials. I tried all possibilities (implementing Cookiebot via GTM or directly in source code, data-cookieconsent parameters, ...), but nothing works...

  • Loic

    Hi Olivier Baudoux we had implemented the Consent Mode and Cookiebot when Google released the beta, but one month later (December 2020) this problem appeared, I think it is to be solved on the Google side because we can see that Cookiebot handles the consent mode correctly: the consent status changes well; GA is well triggered but the data are not processed correctly. Moreover, we don't see a loss of total traffic but some sporadic sessions coming back randomly in Google Analytics, so it proves that it's not Cookiebot's fault (from my point of view).

    When I contacted the Google technical team, they confirmed that Consent Mode had been implemented correctly, without admitting that there was a problem on their side. I think that as the tool is in beta it is still very unstable. Since that day and until today (April 2021) the consent mode still doesn't allow to get data correctly in Google Analytics, that is to say that only a few sessions go up even if thousands of users have accepted/refused the cookies.

    On our side we have removed the Google Consent Mode on all the sites we manage and we try from time to time to re-implement it to see if the problem has been resolved. I would like to have an opinion from a Cookiebot technician but as they only stop at their part (Cookiebot management part) and don't go as far as testing the data feedback in Google Analytics, it will be impossible for them to tell us where the problem comes from : Google vs Cookiebot

  • Phil


    we also have a problem with the Google Consent Mode on a page. We have introduced all scripts as described and in the correct order. So far everything seems to work as well. Currently it looks like this
    1. user comes to the page
    2. GTM and a GA pageview are fired (GA sends gcs = 100, which is correct at this point).
    3. user accepts all cookies
    4. a second GA pageview event is sent. Google Tag Assistant also gives the hint here, "Same web property ID is tracked twice." The second pageview is sent with the correct gcs = 111.

    The problem is: in the second pageview no custom dimensions are sent. Does anyone have maybe the same problem or even a solution? :)

    Many greetings

  • Phil

    Edit: In addition, Google still sends two pageview events after all cookies have been accepted. So when I click on a next page the gsc = G100 is still sent although all consents are set to granted.

    And also here custom dimension are sent only with the G100 pageview

  • Matt


    Is there any need to define the region params as detailed here?

    I'm wondering if that needs applying for cases when cookiebot is set up with consent modules for multiple regions - such as GDPR and CCPA 

  • hugolin69

    I have exaclty the same problem that you have.

    This also make a problem with the purchase, because I suppose Analytics takes only the second fire, which is without the Datalyer.


    Seems there is a resend programmatically in the Consent Mode blackbox.

    Did you manage to fix it ? Can you confirm that you do not use the CMP template from GTM ?

  • Phil

    good to hear that I'm not the only one with this problem! Unfortunately I haven't found a fix yet.
    Yes, I can confirm that I did not use the CMP template

  • hugolin69

    I was having the same problem, using the CMP template, and was thinking it could be associated to this.


    Then, this is meaning, that this is a bug inside the integration of Analytics + GTM + Consent mode. You can use the Analytics Debug extension for Chrome, you will see, that something is resending it, I suppose Consent mode send first a ping, and them resend it with all data if there is consent, but it does not manager to handle the custom dimension and I think also most of the dataloyer.


    This is just creasy how there is no documentation on CookieBot ! This is the result of a very basic integration, following the tutorial !

  • hugolin69

    I just finished to install a very basic test.
    I tried with an very simple GTML account, an empty HTML page.

    I tried launching the CMP with GTM, without nothing else in HTML except the "window.dataLayer = window.dataLayer || [];" before.

    =>I got the 2 "PageView"

    I tried with a manual launching CMP in HTML with CMP before GTM or after

    =>Sometimes I got the 2 "PageView", sometimes not, but seems better to have the CMP script aftert the GTM.

    The second times, it is not launch by my tags, but seems by Google I think, and it does not takes my custom dimension, and my datalayer if I put purchase in my datalayer.

    I think, Google relaunch pageview on "consent update" event.

    And I don't know why, sometimes the events come after the DOM & Window Loaded, some before (rare). If it is before, no second launch, but after there is.

    I precise that on this 2 options, the CMP was already acccepted before.


    I think this is the cause of the problem. Just looking to understand how to have the event update before the DOM and loaded.

    This mean, on the first page, first visit, we will have the TWICE problem in all case, because the update event will always come later.

  • Michael

    Hi, did you find a solution for the purchase tracking ?

    I did everything according the tutorial. But on the thankyou page, the purchase will only be tracked, when there are no "Also-Bought-Item"-Impessions on the page. When there are the alsoBought Datalayer pushed, i think the purchase will be overwritten by the impression an i can not track it any more and send it to Analytics.


Please sign in to leave a comment.