Mangrovea

Installing Google Consent Mode v2

consent mode google v2
Table of contents

From March 2024 Google will require the use of a new version of its tool Google Consent Mode v2 to maintain the functionality of Google tools such as Google Ads and Google Analytics 4. This tool adjusts the operation of Google tags according to users' state of consent, ensuring compliance with data protection regulations such as the RGPD or the DMA. In addition to addressing compliance issues, Google Consent Mode v2 addresses the loss of statistics in the event of non-consent (or absence of consent) by modeling lost data.

Our detailed guide shows you how to install Google Consent Mode v2 on your site using a compatible consent management platform (CMP)like Sirdata. Find out how to configure and use Google Consent Mode v2 for optimized consent management.

Prerequisites and first steps with Google Consent Mode v2

A Google tag, in the most common context, refers to a small piece of code that you place on your website to collect information and send that information to Google. This can be used for various Google services, such as Google Analytics, Google Ads, and Google Tag Manager.

Google Consent Mode v2 enables websites to read and adjust Google tags according to users' preferences regarding Google's advertising products and analytics trackers. It introduces new settings for more precise consent management while complying with regulations such as the RGPD or the DMA.

Understanding how Google Consent Mode works

Google Consent Mode v2 works via an interface called consent mode API, which facilitates the communication of user consent preferences with Google tags. Key API parameters include:

  • analytics_storage manages consent for the storage of analytical data.
  • ad_storage manages consent for the storage of advertising data.
  • ad_user_data User data management: manages the sending of user data related to advertising.
  • ad_personalization Personalization of advertising based on consent.

These parameters can be defined either as granted (tuned) or as denied (refused), depending on the user's decision. Google Consent Mode v2 will then adjust the functionality of Google tags accordingly, for example by limiting ad personalization or conversion tracking.

Different states of consent are possible

There are different states of Google Consent Mode v2

Default consent.

When the user arrives on the site, the default consent state must respect privacy principles, in compliance with the RGPD. By default, all API parameters must be set to deniedwhich blocks Google tags until the user's consent has been obtained.

inspection consent mode: denied

Updated consent.

This option is activated once the user's consent has been received, reflecting their preferences collected via a cookie banner such as the one from Sirdata.
If consent is given in full, Google tags are triggered normally. Otherwise, two options are available if the Google V2 consent mode is activated:

  • Basic substitution consent With this option, Google tags are not triggered, and user data is replaced by simulated consent based on statistical models. It enables conversions to be measured and optimized even in the absence of real consent, and can be used for Google advertising products such as Google Ads, Google Marketing Platform, or Google Ad Manager.
  • Advanced substitution consent Google Analytics: Allows you to collect certain data (timestamp, referrer, user agent, etc.) without consent via pings sent to Google. This is useful for Google Ads and Google Analytics 4, but may not comply with data protection laws because it collects personal data without explicit consent.

Choosing the right implementation method (basic vs. advanced)

Google Consent Mode v2 offers two options: basic and advanced. The basic version limits data collection in the event of non-consent, while the advanced version allows information to be sent to Google even without consent. These include timestamp, referrer URL and user agent.

Please note: The advanced version is, as of March 2024, in a "gray zone" from a legal point of view. Using the advanced version may not comply with data protection regulations, since it processes personal data without consent. We therefore recommend that you opt for the basic version, which ensures respect for privacy and legal requirements, particularly if :

  • Your Google Analytics property collects less than 1000 events per day with the parameter analytics_storage=denied.
  • You get less than 100 clicks per day on your Google Ads.

Configuring Google consent mode v2 with Sirdata

What is Sirdata? 

Sirdata is a French company that, among other things, provides solutions for privacy and regulatory compliance, helping publishers comply with laws such as the RGPD in Europe, offering tools for cookie management consent and personal data protection. Sirdata's technology is widely used in the industry.

Sirdata cookie banner

Create your cookie banner with Sirdata :

To do it yourself, create your Sirdata CMP accountand create your cookie banner (CMP) by going to "Configuration and "Add to cart.

configuration CMP banner cookie sirdata

Configure the design, advanced settings, modules, partners and purposes using the installation guide.

Once configured, you'll get the code for your cookie banner.

code banière cookie sirdata
Mangrovea is all-inclusive!Our advertising management offer supports the installation and configuration of your cookie banner with Sirdata

Activate the Google Consent Mode V2 option:

In the "Edit add-ons" section of your Sirdata CMP.

activation of consent mode v2 sirdata

Installation on your site :

The cookie banner should be installed in the code of all your website pages, in the section as high up as possible (even before your Google Tag Manager container).

Remember also to update your privacy policy to indicate your adherence to the Transparency & Consent Framework.

[Company name] participates in and complies with all IAB Europe Transparency &amp; Consent Framework Specifications and Policies. [He/She] uses the Consent Management Platform n°92.<br/><br/>

You can change your choices at any time by <a href='javascript:Sddan.cmp.displayUI()'>click here</a>.

Enabling consent mode in Google Tag Manager (GTM) : 

Access your GTM account and go to the "Admin > "Container parametersand activate the "consent overview.

activate GTM consent overview

Normally, you should see a new icon appear on your tag space at the level of your tags.

consent mode view gtm icon

Setting consent for your Google tags

Select all your Google tags (Google Ads, Google Analytics, etc.) and click on the icon to "Modify consent settings.

consent mode view gtm icon

Set them to "No additional consent required".

Verification, deployment and performance monitoring

Once the Google Consent Mode v2 configured and customized on your website, remember to check that it works.

Test Google Consent Mode v2 on your site

Here are the recommended tools for testing Google Consent Mode v2 on your site:

  • Google Tag Assistant : This Chrome extension helps you confirm that your Google tags are set up correctly. It allows you to check whether Google Consent Mode v2 is enabled, identify consent settings and see which Google tags are running or being blocked based on user consent. After installing and activating Google Tag Assistant, visit your site for a detailed report on the status of your Google tags and Google Consent Mode v2. To find out more, the official guide is available.

    In this example, the Google Analytics tag in the tool's consent tab has a start state of "denied" and a status update " granted " set up after validation on the Sirdata cookie banner.
google tag assistant consent view
  • Consent mode inspector : A chrome extension download here for a quick initial analysis of your site.
inspection consent mode: granted

Identify and solve common problems

When using Google Consent Mode v2, you may encounter problems such as :

  • Google tags don't work as expected This may be due to incorrect configuration, conflicts with other scripts or extensions, or problems with cache or cookies. To remedy this, make sure that the Google Consent Mode v2 code is correct, disable any conflicting scripts or extensions, and clean up your browser's cache and cookies.
  • Incorrect or incomplete analytical or advertising data This problem may be due to a low user consent rate, incorrect attribution of conversions, or incompatibility with other Google products. To correct it, rethink your consent strategy, enable substitute consent, or check that you're using the latest versions of Google products.
  • Non-compliance with data protection regulations Google Consent Mode v2: Using the advanced variant without valid user consent or lacking transparency on data use can cause this problem. To resolve it, opt for the basic variant of Google Consent Mode v2, use a compatible consent management platform (CMP), or clarify your privacy practices with users.

Assess the impact of Consent Mode V2 on your data

Measuring impact in Google Analytics 4

In your Google Analytics 4, go to " Administration " then " identity for reporting" you can then switch between the " Mixed "that is, with modeling (when enabled), with the " Observed" .

You can go either way at any time.

reporting identity google analytics 4

Conclusion

Google Consent Mode v2 is the solution provided by Google to meet legal imperatives imposed by the European Union (RGPD, DMA) and needs in terms of marketing analysis. Although its implementation may incur certain costs for advertisers, setting up this functionality is essential to keep Google tools running smoothly. Services such as Sirdata facilitate the integration of this solution.

If you have any questions, please contact our expert team remains at your disposal to guide and assist you in implementing this project.

Did you like this article?

Share it with friends and colleagues!

Latest articles

Want to know more about the latest trends in digital marketing?

Discover other thematic resources

Want to learn more about a new topic? Check out our other thematic resources.

Book a discovery call

Choose a date and time that suits you for a discovery call with our team.

Your contact
Sébastien Castelli
Co-Founder
Book a discovery call

Choose a date and time that suits you for a discovery call with our team.

Your contact
Maxime Cochini
CEO & Co-Founder
Themes: Ads
Book a discovery call

Choose a date and time that suits you for a discovery call with our team.

Your contact
Sébastien Castelli
Co-Founder
Book a discovery call

Choose a date and time that suits you for a discovery call with our team.

Your contact
Maxime Cochini
CEO & Co-Founder
Themes: Ads
Recap

The B2B marketing newsletter.
One issue per week.

Actionable 100% tips

No spam