How to check your Google Consent Mode v2 advanced implementation on web?

This guide will help you undertake some of the necessary checks to make sure your Google Consent Mode (GCM) v2 advanced setup is working as expected for your website.

1. What is Google Consent Mode?

2. What is Google Consent Mode advanced?

3. How to check your Consent Mode V2 advanced setup

4. How to decipher the gcd parameter

Verify the consent notice UI
Website - Prior consent
Website - After positive consent (optin)
Website - After negative consent (optout)
GTM - Prior consent
GTM - After positive consent (optin)
GTM - After negative consent (optout)
Still need help?


1. What is Google Consent Mode?

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

After several months, Google has come up with a v2 of the feature. If needed, please read more about Google Consent Mode v2 and how to set it up in our article.

2. What is Google Consent Mode advanced?

There are two modes available: advanced and basic. To know more about the difference between the two, please refer to this part of our article.

If you're not sure of the trade-off between advanced and basic or not sure of the signals to enable prior consent for the advanced mode, Didomi recommends that you consult with your Data Protection Officer or legal team. 

In this article, we'll focus on verifying an advanced mode implementation. This means related Google tags will trigger as soon as Didomi is loaded and GCM signals are set.
The data collected will adapt to the GCM default signals and user's choices. In other words; data will always be collected. And what is collected exactly and possibly stored may vary based on your settings and users choices.

The main benefits are: "get modelled data in your GA4 property [for traffic and audiences] to fill in the gaps for the missing observed data when users decline consent."
Source: Consent mode on websites and mobile apps

3. How to check your Consent Mode V2 advanced setup

The goal is to verify that requests are sent and the GCM information sent along with them matches your settings or your users' choices.

How you've enabled GCM (through our console, using the GTM template, or using the didomiConfig option - see this part of our other article) doesn't impact where to check your tags' behaviour.

The scripts' location is what matters for the upcoming checks. The checks can be done:

  • On your website, if your Google tags are hard-coded
  • Through the GTM preview (or on your website), if your Google tags are set in GTM

4. How to decipher the gcd parameter

The gcd parameter is added to every Google Ad Words or Google Analytics requests when GCM is enabled. It reflects the GCM signals statuses and it is what guarantees Google that GCM is enabled (and consent is being collected).
It's not publicly documented by Google but there are articles and litterature about this.


It's a string composed of several parts where each part can have different values:

gcd=11<ad_storage>X<analytics_storage>X<ad_user_data>X<ad_personalization>5

“11” – prefix that doesn't change (or sometimes "13")

“5” - suffix that doesn't change (or sometimes "7") 


X can have the values:

“1” – separators for consent parameter values (“ad_storage”, “analytics_storage”, “ad_user_data” and “ad_personalization”)

“3” – separators for consent parameter values (“ad_storage”, “analytics_storage”, “ad_user_data” and “ad_personalization”)

 

Y can have the following values:

“p” – default “denied” value

“t” – default “granted” value

q”, “m” or “u” – “denied” value during an update after user interaction with the CMP

“e”, “r”, “n” or “v” – “granted” value during an update after user interaction with the CMP

“l” – consent parameter is not set

 

For instance:

13t3p3p3p5 = 

  • ad_storage granted by default
  • analytics_storage denied by default
  • ad_user_data denied by default
  • ad_user_personnalization denied by default

13u3q3q3q5 = 

  • ad_storage denied after user choice (and previously granted)
  • analytics_storage denied after user choice
  • ad_user_data denied after user choice
  • ad_user_personnalization denied after user choice

* Verify the consent notice's UI

Based on the vendors you've enabled through the integration of the console or via the template, verify that the vendors are present and correctly displayed in the notice.

  1. Open your website in an incognito window
  2. Go to the vendors' view of your banner
  3. Check the vendors


Case 1: you've enabled both vendors



Case 2: you've only enabled the Google Advertising Products vendor


Case 3: you've only enabled the Google Analytics Products vendor



* Website - Prior to consent:
Verify the Google Analytics, Ad Words, Floodlight or Conversion Linker desired hits are sent and contain the expected gcd value

  1. Open an incognito window
  2. Before accessing your website, open the dev tools with a right click and then "Inspect"
  3. Open your website
  4. Go to the "Network" tab of your browser console, on the top left
  5. Use the filter to examine that there are requests containing the words "analytics.js" (legacy), "gtag", "collect", and that they contain a "gcd" parameter
  6. Check the value of the gcd parameter and make sure it matches your default settings

* Website - After positive consent (optin):
Verify the requests contain the proper gcd parameter after positive consent is given 

  1. Before accessing your website, open the dev tools with a right click and then "Inspect"
  2. Open your website in an incognito window
  3. Go to the "Network" tab, on the top left
  4. Agree to all on the notice 
  5. Check that the requests contain a "gcd" parameter and that its value reflects everything being granted

* Website - After negative consent (optout):
Verify the requests contain the proper gcd parameter after positive consent is given 

  1. Before accessing your website, open the dev tools with a right click and then "Inspect"
  2. Open your website in an incognito window
  3. Go to the "Network" tab, on the top left
  4. Disagree to all on the notice 
  5. Check that the Analytics and Ad Words requests contain a "gcd" parameter and that its value reflects each signal as denied

 

* GTM - Prior to consent:
Confirm Google tags are triggered and Consent is set

  1. Open Tag Manager in incognito mode (or clear your cookies and local storage for your website in your favourite browser)
  2. In your Tag Manager console, hit the "Preview" button
  3. Set your website's URL
  4. Establish that your Google Analytics, Ad Words, Floodlight or Conversion Linker tags are triggered (fired) on the didomi-ready event
    Make sure they're not triggered before
  5. Check the Consent (default) event
    Go to the Consent tab and check that the On-page default statuses match with your settings 

* GTM - After positive consent (optin):
Confirm Google tags are triggered and Consent is granted 

  1. Open Tag Manager in incognito mode (or clear your cookies and local storage for your website)
  2. In your Tag Manager console, hit the "Preview" button
  3. Set your website's URL
  4. Agree to all in the notice
  5. Check that there is a Consent (update) event and that GCM signals are set as granted in the On-page Update column

GTM - After negative consent (optout):
Confirm desired Google tags are triggered and Consent is set as expected

  1. Open Tag Manager in incognito mode (or clear your cookies and local storage for your website)
  2. In your Tag Manager console, hit the "Preview" button
  3. Set your website's URL
  4. Disagree to all on the notice
  5. Verify that your Google Analytics, Ad Words, Floodlight or Conversion Linker tags are triggered (fired) on the didomi-ready event
  6. Check that there is a Consent (update) event and that every GCM signal (except security_storage) is set as denied in the On-page Update column

Still need help?
Are you unsure of your settings or have noticed something unusual?

Please feel free to reach out to support@didomi.io