Enable Google Consent Mode with Didomi [NEW FLOW]

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 allows you to obtain insights on campaign conversions and other data, always respecting user consent choices for ads cookies and analytics cookies, which will help you to optimize and improve ad monetization. 

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

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

👉If a user does not provide consent, the relevant Google tags will adapt accordingly and will 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 using the global site tag (gtag.js) or Google Tag Manager, and 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 Google's 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 or not the user has given consent for Google Analytics and Google Ads cookies. Google's tags will dynamically adapt, only using 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. 

Option 1:
  1. Go to the Consent notices section and click on the Edit icon for your notice.
  2. Go to step 2. Customization and then to the Integrations section.
  3. Click on the Advertising tab.  Capture d’écran 2023-03-09 à 12.05.34
  4. Activate the integration.
  5. Follow the steps described in our 📰 technical documentation

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 need to unselect this if no longer needed.  To avoid losing data, be sure to configure GA properly before unselecting.

Option 2:

This option is for those not using Didomi's Google Consent Mode integration.
The link and integration would be done through the GTM template directly.
👉Please refer to our 📰 technical documentation or our 📰 Github repo.

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

To ensure that Didomi is able to send events to Google Analytics, Google Ads, and Google Floodlight, make sure Didomi is correctly configured before loading. You will need to change your current configuration and make sure gtag.js is used.

1. In a tag manager

Before Google Consent Mode, your Google Analytics, Google Ads and Google Floodlight were probably conditioned on:

  • Didomi ready-event or the user modifying their consent choices (didomi-consent or didomi-consent-changed)
  • Vendors having user consent

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

You will no longer need any condition on your custom events.

2. Outside a tag manager

In this case, you have probably added some data attributes to your Google Analytics tag,  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 or not the user has given consent. 

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