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.
- Open your website in an incognito window
- Go to the vendors' view of your banner
- 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
- Open an incognito window
- Before accessing your website, open the dev tools with a right click and then "Inspect"
- Open your website
- Go to the "Network" tab of your browser console, on the top left
- Use the filter to examine that there are requests containing the words "
analytics.js
" (legacy), "gtag
", "collect
", and that they contain a "gcd
" parameter - 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
- Before accessing your website, open the dev tools with a right click and then "Inspect"
- Open your website in an incognito window
- Go to the "Network" tab, on the top left
- Agree to all on the notice
- 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
- Before accessing your website, open the dev tools with a right click and then "Inspect"
- Open your website in an incognito window
- Go to the "Network" tab, on the top left
- Disagree to all on the notice
- Check that the Analytics and Ad Words requests contain a "
gcd
" parameter and that its value reflects each signal asdenied
* GTM - Prior to consent:
Confirm Google tags are triggered and Consent is set
- Open Tag Manager in incognito mode (or clear your cookies and local storage for your website in your favourite browser)
- In your Tag Manager console, hit the "Preview" button
- Set your website's URL
- 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 - 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
- Open Tag Manager in incognito mode (or clear your cookies and local storage for your website)
- In your Tag Manager console, hit the "Preview" button
- Set your website's URL
- Agree to all in the notice
- Check that there is a
Consent
(update) event and that GCM signals are set asgranted
in the On-page Update column
GTM - After negative consent (optout):
Confirm desired Google tags are triggered and Consent is set as expected
- Open Tag Manager in incognito mode (or clear your cookies and local storage for your website)
- In your Tag Manager console, hit the "Preview" button
- Set your website's URL
- Disagree to all on the notice
- Verify that your Google Analytics, Ad Words, Floodlight or Conversion Linker tags are triggered (fired) on the
didomi-ready
event - Check that there is a
Consent
(update) event and that every GCM signal (exceptsecurity_storage
) is set as denied in the On-page Update column