1. Help Center
  2. Consent Notices

Enable Google Consent Mode with Didomi

For advertisers, Google Consent Mode (GCM) serves as a link between data privacy and digital advertising by adjusting the behavior of Google tags to the consent status of your users. This way, you can obtain insights about campaign conversions and other data, always respecting user consent choices for ads cookies and analytics cookies, which will help you optimize and improve ad monetization. 

With Consent Mode, your Google tags will be able to determine whether or not a user has given cookie consent for advertising purposes:

👉If a user consents, the measurement tools used will continue to run as usual.

👉If a user does not consent, the relevant Google tags will adapt accordingly to not use ads cookies. Instead, other measurement processes will be used at a more aggregate level.

How does it work? 

Google Consent Mode introduces two new tag settings which manage cookies for advertising and analytics purposes for advertisers. This is done by using the global site tag (gtag.js) or Google Tag Manager. It works with the following products:

  • Google Ads
  • Floodlight
  • Google Analytics

Google Consent Mode adjusts the behavior of consent status, conversion and Google Analytics pings.

Learn more about Google Consent Mode in their documentation.

Enable Google Consent Mode with Didomi

⚠️ Google Consent Mode will be enabled by default on all new notices. If you create a new notice and you do not want to use Google Consent Mode, you will need to disable it manually.


With Google Consent Mode, Didomi's consent notice sends information to Google about whether the user has given consent or not for Google Analytics and Google Ads cookies. Google's tags will dynamically adapt, only utilizing tools for the specified purposes when consent has been given by the user.

When consent for ad storage or analytics storage is denied, the associated Google measurement functions deployed via global site tags (gtag.js) or Google Tag Manager will adjust their behavior accordingly.


Google Consent Mode only works with gtag.js, so make sure you are using gtag.js and not other legacy tags such as ga.js, analytics.js or conversion.js. 

First option:
  1. Activate our integration in the step "INTEGRATIONS" of  the Didomi console. 
  2. Follow the steps described in our 📰 technical documentation

GCM integration

You can enable GCM integration and select either Google Analytics Products or Google Advertising Products or both vendors.

👉Your old Google Analytics vendor will still be selected and you will have to unselect it if don't need it anymore. Be sure to configure GA properly before unselecting it to avoid losing data. 

Second option:
In this case, you wouldn't need the Google Consent Mode integration from Didomi.
The link and integration would be done through the template directly.
👉Please refer to our 📰 technical documentation or our 📰 Github repo to do so.

What to do about Google Analytics, Google Ads, and Google Floodlight?

To make sure Didomi is able to send events to Google Analytics, Google Ads, and Google Floodlight, you will have to make sure Didomi is ready before loading them.
To do so, you will have to change your current configuration and make sure that gtag.js is used.

1. In a tag manager

Before Google Consent Mode, you probably had conditioned Google Analytics, Google Ads and Floodlight to:

  • Didomi being ready or the user modifying his consent choices
  • The vendors having user consent

To make sure Google Consent Mode is working, you remove these vendors conditions and only use the didomi-ready event. 

You will not need any condition on your custom events anymore.

2. Outside a tag manager

In this case, you probably added some data attributes to your Google Analytics tag, or Google Ads (aka Google Ad Words) or Google Floodlight.
For example for Google Analytics:

<script type="didomi/javascript" data-vendor="your-ga-vendor-sdk-id" src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>

For Google Consent Mode, you will have to remove the data-vendor attribute from your tags to load them on every page whether the user has given consent or not. 

<script type="didomi/javascript" src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>