Google Consent Mode v2 (Advanced)
Access Type: Regulations Manager - Editor
Google Consent Mode v2 ensures that Google vendors associated with a regulation comply with an end-user's consent choices (called consent types) defined by Google. In this article, we will cover how to implement Google Consent Mode v2 on a regulation utilizing Google advanced consent mode setup.
Google Consent Mode v2 (Advanced) overview
In the advanced version of Google Consent Mode v2, Google product tags still load when an end-user accesses your website or app (unlike the basic version). Google tags will load the consent mode API and do the following:
Set default consent states for consent types. By default, consent may be
denied, unless your organization sets its own default values. While consent isdenied, the Google tags send cookieless pings.Wait for end-user interaction with the widget and update consent states accordingly. Only when an end-user grants consent to data collection, will Google tags send the full measurement data. Learn more about tag behavior.

Google consent mode products
The following Google products have built-in consent checks and will adjust behavior based on the end-user's consent state for Google consent types:
Google Tag
Google Analytics (includes Google Analytics for Firebase SDK)
Google Ads (includes Google Ads Conversion Tracking and Remarketing; support for Phone Call Conversions is pending.)
Floodlight
Conversion Linker
Consent check varies across each Google product and can be viewed by selecting a vendor from the GTM platform and expanding the Advanced Settings > Consent Settings tab.

Implement Google Consent Mode v2 (Advanced)
Didomi offers multiple ways your organization can implement Google Consent Mode v2 (Advanced) for your regulation. Please see the tabs below for the method that best suits your organization's needs:
In this tab, we will cover how to utilize Google Tag Manager to implement Google Consent Mode v2 (Advanced) for your regulation that utilizes a data collection scope by vendor.
Configure Google Consent Mode v2 (Advanced) on regulation
Google Consent Mode v2 is enabled by default for regulations that utilize a data collection scope by vendor but may still require additional configuration to align with the basic mode implementation.
Navigate to a regulation that utilizes a data collection scope by vendor and navigate to the Frameworks card on the Global Settings page.
Ensure that Google Consent Mode is enabled.

By enabling the Google Consent Mode framework for the regulation, Didomi will automatically add the following vendors to the regulation:
Google Advertising Products
Will add Google Advertising Products vendor (API ID: google) to the regulation. Designed to encompass Google products who utilize one or more of the following consent types:
ad_storagead_user_dataad_personalizationfunctionality_storagepersonalization_storagesecurity_storage
Google Analytics Products
Will add Google Analytics Products vendor (API ID: googleana-4TXnJigR) to the regulation. Designed to encompass Google products who require the analytics_storage consent type.
Next, navigate to the Vendors & Purposes tab and use the provided vendor x purpose matrix to configure processing rules, remove one of the purposes, etc... for the added vendors. See Configure regulation (by vendor) for more information.

Finally, navigate to the Frameworks tab and expand the Google Consent Mode v2 accordion to configure the details of the framework.

Review the table below for information on each toggle in the integration configuration:
Note: In order to successfully implement Google Consent Mode v2 (Advanced) for the regulation, your organization will need to have Google Advertising Products and/or Google Analytics Products enabled depending on the Google products your organization utilizes.
Set the default status of Google Consent Mode when the page loads
The advanced version of Google Consent Mode v2 will load Google tags when an end-user accesses your website with a default status for all Google consent types. The default status is denied unless configured otherwise below.
Enable this toggle to ensure this default status is set for the advanced version.
Enable Google Advertising Products
When enabled, indicates that Google Advertising Products vendor (API ID: google) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable {consent type} before user gives consent
For each consent type, will override the default status of the Google consent type and set it to granted as soon as the Google product tag loads.
Consult with your organization's legal counsel and DPO before enabling any of these settings.
Enable Google Analytics Products
When enabled, indicates that Google Analytics Products vendor (API ID: googleana-4TXnJigR) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable IAB TCF integration with Google Consent Mode
Enables Didomi to set an additional flag (TCData.enableAdvertiserConsentMode to true) for getTCData and addEventListener commands. This additional flag allows Google to infer and map consent settings to the following Google Consent Mode v2 consent types based on IAB TCF purposes:
ad_storagead_user_dataad_personalization
Click here for more information on how Google calculates the mapping between IAB TCF purposes and Google consent types.
The TCF integration with Google Consent Mode does not support Google product tags that require the analytics_storage, functionality_storage, personalization_storage, or security_storage consent types.
For Google products that require the analytics_storage consent type, Didomi will set this consent type to granted if the end-user consents globally (consent to vendor and all of its purposes) for Google Analytics Products (API ID: googleana-4TXnJigR).
Only available when the IAB TCF is also added to the regulation's frameworks.
Data layer name
By default, Didomi utilizes dataLayer as the variable name for your organization's Google Tag Manager dataLayer. If your organization has edited the variable name for your dataLayer then input that variable name in the provided space.
Tracking app conversions with Firebase and Google's AAP partners
Click here for more information when configuring Google Consent Mode v2 (Advanced) for mobile SDKS.

Configure Google product tag(s)
Note: This section assumes that your organization has already embedded the Google Tag Manager tag onto your website.
In order to ensure Google product tags are loaded (and the default status for Google consent types exposed) your organization must configure Google product tags to load once the Didomi SDK is ready and Google Consent Mode v2 is set.
There are two methods available to your organization to configure the Google product tags. Choose a method below that best suites your organization's use-case:
Edit Google Tag Manager tag on-page
Utilize the Didomi <script> tag attributes to edit the Google Tag Manager tags on your website to include type="didomi/javascript" . The Google product tags configured in your Google Tag Manager will load as soon as the SDK is ready but without a specific link to a vendor.
Google product tags in Google Tag Manager
From your organization's Google Tag Manager workspace, navigate to your Google product tag and edit the trigger.

Use the Google Tag Manager workflow to configure a new trigger for the Google product tag with the following fields:

When finished, Save the trigger and tag setup. Submit your Google Tag Manager container changes aligned with your organization's policies.
In this tab, we will cover how to implement Google Consent Mode v2 (Advanced) on your regulation with a data collection scope by vendor when your organization utilizes gtag.js tags for the Google products directly on your website.
Configure Google Consent Mode v2 (Advanced) on regulation
Google Consent Mode v2 is enabled by default for regulations that utilize a data collection scope by vendor but may still require additional configuration to align with the advanced mode implementation.
Navigate to a regulation that utilizes a data collection scope by vendor and navigate to the Frameworks card on the Global Settings page.
Ensure that Google Consent Mode is enabled.

By enabling the Google Consent Mode framework for the regulation, Didomi will automatically add the following vendors to the regulation:
Google Advertising Products
Will add Google Advertising Products vendor (API ID: google) to the regulation. Designed to encompass Google products who utilize one or more of the following consent types:
ad_storagead_user_dataad_personalizationfunctionality_storagepersonalization_storagesecurity_storage
Google Analytics Products
Will add Google Analytics Products vendor (API ID: googleana-4TXnJigR) to the regulation. Designed to encompass Google products who require the analytics_storage consent type.
Next, navigate to the Vendors & Purposes tab and use the provided vendor x purpose matrix to configure processing rules, remove one of the purposes, etc... for the added vendors. See Configure regulation (by vendor) for more information.

Finally, navigate to the Frameworks tab and expand the Google Consent Mode v2 accordion to configure the details of the framework.

Review the table below for information on each toggle in the integration configuration:
Note: In order to successfully implement Google Consent Mode v2 (Advanced) for the regulation, your organization will need to have Google Advertising Products and/or Google Analytics Products enabled depending on the Google products your organization utilizes.
Set the default status of Google Consent Mode when the page loads
The advanced version of Google Consent Mode v2 will load Google tags when an end-user accesses your website with a default status for all Google consent types. The default status is denied unless configured otherwise below.
Enable this toggle to ensure this default status is set for the advanced version.
Enable Google Advertising Products
When enabled, indicates that Google Advertising Products vendor (API ID: google) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable {consent type} before user gives consent
For each consent type, will override the default status of the Google consent type and set it to granted as soon as the Google product tag loads.
Consult with your organization's legal counsel and DPO before enabling any of these settings.
Enable Google Analytics Products
When enabled, indicates that Google Analytics Products vendor (API ID: googleana-4TXnJigR) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable IAB TCF integration with Google Consent Mode
Enables Didomi to set an additional flag (TCData.enableAdvertiserConsentMode to true) for getTCData and addEventListener commands. This additional flag allows Google to infer and map consent settings to the following Google Consent Mode v2 consent types based on IAB TCF purposes:
ad_storagead_user_dataad_personalization
Click here for more information on how Google calculates the mapping between IAB TCF purposes and Google consent types.
The TCF integration with Google Consent Mode does not support Google product tags that require the analytics_storage, functionality_storage, personalization_storage, or security_storage consent types.
For Google products that require the analytics_storage consent type, Didomi will set this consent type to granted if the end-user consents globally (consent to vendor and all of its purposes) for Google Analytics Products (API ID: googleana-4TXnJigR).
Only available when the IAB TCF is also added to the regulation's frameworks.
Data layer name
By default, Didomi utilizes dataLayer as the variable name for your organization's Google Tag Manager dataLayer. If your organization has edited the variable name for your dataLayer then input that variable name in the provided space.
Tracking app conversions with Firebase and Google's AAP partners
Click here for more information when configuring Google Consent Mode v2 (Advanced) for mobile SDKS.

Install Google product tags
Add the necessary tags for your consent aware Google products (e.g. Floodlight, Conversion Linker, etc...) to your website.
In accordance with a Google Consent Mode v2 (Advanced) setup, these Google products will still load when an end-user accesses the website. By default, the consent state for all Google consent types will be denied unless configured otherwise and these tags will only send cookieless pings. Only when an end-user has granted consent will the Google product tags send full measurement data.
In order to ensure Google product tags are loaded (and the default status for Google consent types exposed) your organization must configure each Google product tag to load only once the Didomi SDK is ready and Google Consent Mode v2 is set.
Utilize the Didomi <script> tag attributes to edit the Google product tags on your website to include type="didomi/javascript" .
Do not enable the Google Consent Mode v2 toggle in the Didomi console when utilizing the GTM template as the implementation method for Google Consent Mode v2 (Advanced).

Information on implementing Google Consent Mode v2 (Advanced) via the Didomi GTM template can be found below:
On mobile applications, Google Consent Mode v2 works through SDKs such as Firebase and Google Ads SDKs. These SDKs rely on consent signals that are provided programmatically at runtime. Consent signals must be passed early in the app lifecycle to ensure Google SDKs respect end-user choices.
In this tab, we will cover how to implement Google Consent Mode v2 (Advanced) framework on a regulation for a mobile application.
Requirements
Review the table below for more information on the required minimum version of the Didomi mobile SDK used in your application that supports the Firebase SDK and Google Ads SDK:
iOS/tvOS
>v2.27.0
Android
>v2.27.0
Configure Google Consent Mode v2 (Advanced) on regulation
Google Consent Mode v2 is enabled by default for regulations that utilize a data collection scope by vendor but may still require additional configuration to align with the advanced mode implementation.
Navigate to a regulation that utilizes a data collection scope by vendor and navigate to the Frameworks card on the Global Settings page.
Ensure that Google Consent Mode is enabled.

By enabling the Google Consent Mode framework for the regulation, Didomi will automatically add the following vendors to the regulation:
Google Advertising Products
Will add Google Advertising Products vendor (API ID: google) to the regulation. Designed to encompass Google products who utilize one or more of the following consent types:
ad_storagead_user_dataad_personalizationfunctionality_storagepersonalization_storagesecurity_storage
Google Analytics Products
Will add Google Analytics Products vendor (API ID: googleana-4TXnJigR) to the regulation. Designed to encompass Google products who require the analytics_storage consent type.
Next, navigate to the Vendors & Purposes tab and use the provided vendor x purpose matrix to configure processing rules, remove one of the purposes, etc... for the added vendors. See Configure regulation (by vendor) for more information.

Finally, navigate to the Frameworks tab and expand the Google Consent Mode v2 accordion to configure the details of the framework.

Review the table below for information on each toggle in the integration configuration:
Note: In order to successfully implement Google Consent Mode v2 (Advanced) for the regulation, your organization will need to have Google Advertising Products and/or Google Analytics Products enabled depending on the Google products your organization utilizes.
Set the default status of Google Consent Mode when the page loads
The advanced version of Google Consent Mode v2 will load Google tags when an end-user accesses your website with a default status for all Google consent types. The default status is denied unless configured otherwise below.
Enable this toggle to ensure this default status is set for the advanced version.
Enable Google Advertising Products
When enabled, indicates that Google Advertising Products vendor (API ID: google) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable {consent type} before user gives consent
For each consent type, will override the default status of the Google consent type and set it to granted as soon as the Google product tag loads.
Consult with your organization's legal counsel and DPO before enabling any of these settings
Enable Google Analytics Products
When enabled, indicates that Google Analytics Products vendor (API ID: googleana-4TXnJigR) is added to the regulation. If the toggle is deactivated then the vendor will be removed.
Enable IAB TCF integration with Google Consent Mode
Enables Didomi to set an additional flag (TCData.enableAdvertiserConsentMode to true) for getTCData and addEventListener commands. This additional flag allows Google to infer and map consent settings to the following Google Consent Mode v2 consent types based on IAB TCF purposes:
ad_storagead_user_dataad_personalization
Click here for more information on how Google calculates the mapping between IAB TCF purposes and Google consent types.
The TCF integration with Google Consent Mode does not support Google product tags that require the analytics_storage, functionality_storage, personalization_storage, or security_storage consent types.
For Google products that require the analytics_storage consent type, Didomi will set this consent type to granted if the end-user consents globally (consent to vendor and all of its purposes) for Google Analytics Products (API ID: googleana-4TXnJigR).
Only available when the IAB TCF is also added to the regulation's frameworks.
Data layer name
By default, Didomi utilizes dataLayer as the variable name for your organization's Google Tag Manager dataLayer. If your organization has edited the variable name for your dataLayer then input that variable name in the provided space.
Firebase
Firebase is the core SDK for Google apps. Once enabled, the integration ensures:
proper mapping of Didomi consent signals to Firebase
automatic propagation to Google SDKs for measurement and advertising
simplified compliance for GDPR and similar regulations
Branch
App Attribution Partners (AAP) like Branch need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.
When Branch is enabled for the regulation and the Branch SDK is present in your app, Didomi manages the Google Consent Mode signal propagation for Branch.
For end-users in GDPR-regulated regions, Didomi indicates compliance context by setting eea to 1 and applies default values for consent signals based on your configuration in the console. After the end-user provides consent, Didomi recalculates the status of these signals using the end-user’s consent for Google Advertising Products and Google Analytics Products and updates Branch accordingly.
For users outside GDPR regions, Didomi sets eea to 0 to indicate that no GDPR obligations apply.
Kochava
App Attribution Partners (AAP) like Kochava need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.
When Kochava is enabled for the regulation, Didomi ensures that Kochava receives the consent string needed to populate Google’s consent signals. Kochava uses this consent information during install and event transmissions.
When the CMP collects end-user consent, the consent string is shared with Kochava through Didomi, provided that the SDK is configured to send installs or events after the end-user has given consent.
Kochava parses the TCF consent string and applies it to build Google-required signals. This process works seamlessly with CMPs that support the IAB Transparency & Consent Framework (TCF) v2.3 or the Global Privacy Platform API v1.1.
Airbridge
App Attribution Partners (AAP) like Airbridge need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.
When Airbridge is enabled in the console and the Airbridge SDK is detected in the app, Didomi computes the appropriate Google Consent Mode signals and shares them with Airbridge.
For end-users located in the EEA (European Economic Area) and therefore subject to GDPR, Didomi informs Airbridge that the user is in a regulated region by setting eeaRegion to true. At the same time, Airbridge receives the default values for consent signals based on your configuration in the Didomi SDK. Once the end-user provides their consent through the CMP, Didomi updates these signals and ensures that Airbridge reflects the end-user’s actual preferences.
For end-users outside the EEA, Didomi signals that the end-user is not in a GDPR-regulated region by setting eeaRegion to false.
AppsFlyer
App Attribution Partners (AAP) like AppsFlyer need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.
When AppsFlyer is enabled in the console and the AppsFlyer SDK is present in your app, Didomi manages the Google Consent Mode signal propagation for AppsFlyer.
For users in GDPR-regulated regions, Didomi indicates compliance context by setting
isUserSubjectToGDPRtotrueand applies default values for consent signals based on your configuration in the console. After the end-user provides consent, Didomi recalculates the status of these signals using the end-user’s consent for Google Advertising Products and Google Analytics Products and updates AppsFlyer accordingly.For users outside of GDPR jurisdiction, Didomi will set
isUserSubjectToGDPRtofalse.If you have enabled IAB TCF integration with Google Consent Mode, Didomi will automatically instruct AppsFlyer to use the TC string by setting
enableTCFDataCollection(true). As a result, AppsFlyer can directly get the user's consent from the TC string inSharedPreferences

Test Google Consent Mode v2 (Advanced)
When successfully and appropriately configured, a Google Consent Mode v2 (Advanced) implementation will trigger Google product tags but with the consent state of Google consent types defaulted to denied unless otherwise configured. In this section we will cover how to test whether your Google Consent Mode v2 (Advanced) configuration is working as intended.
Confirm Google product vendors on widget
As mentioned above during the configuration, Google Consent Mode v2 (Advanced) requires the use of the following vendors Google Advertising Products (API ID: google) and/or Google Analytics Products (API ID: googleana-4TXnJigR) depending on the Google products your organization utilizes.
Before continuing, ensure that the correct vendors are added to the widget to reflect the Google products that will be triggered:

Test Google product tag triggering
When testing the Google Consent Mode v2 (Advanced) implementation, your organization will want to confirm three actions :
Google products load with consent types defaulted to a consent state of
deniedunless configured otherwiseGoogle products update to show consent types set to a consent state of
denieddue to end-user choiceGoogle products update to show consent types set to a consent state of
granteddue to end-user choice
How your organization tests that Google product tag(s) are triggering as expected of a Google Consent Mode v2 (Advanced) setup is dependent on how you configured the implementation on the regulation:
Google Tag Manager
Google Tag Manager
Website
gtag.js
Website
GTM template
Google Tag Manager
Website
Mobile SDK
Didomi SDK Logs
Firebase DebugView
ADB (Android) or Xcode Console (iOS) for runtime logs
Network sniffers (e.g. Charles Proxy) for verifying event payloads
In this tab, we will cover how to test your organization's Google Consent Mode v2 (Advanced) implementation via the website on which the Didomi widget is deployed.
gcd parameter
The gcd parameter is included in the payload for every Google Ad Words and Google Analytics network request when Google Consent Mode v2 is enabled. The parameter reflects the status of Google Consent Mode v2 consent types and assures Google that consent mode is enabled and that consent is collected.
Note: While the gcd parameter is not publicly documented by Google it is available in multiple articles.
The gcd parameter is a character string that is composed of several components that can have multiple values. The format of the character string is as follows:
gcd=13<ad_storage>3<analytics_storage>3<ad_user_data>3<ad_personalization>5
Prefix
Unchanging start of the character string. Represented by an 11 or 13
Suffix
Unchanging end of the character string. Represented by a 5 or 7
Separator
Separates the consent status values for the different consent types (ad_storage, analytics_storage, etc...). Represented by a 1 or 3
Consent status
The consent status for each of the represented consent types (ad_storage, analytics_storage, ad_user_data, ad_personalization) follows the structure below:
p- Denied default valuet- Granted default valueq,m,u- Denied after end-user choicee,r,n,v- Granted after end-user choice1- Undefined
Example:
13t3p3p3p5
ad_storageis granted by defaultanalytics_storageis denied by defaultad_user_datais denied by defaultad_user_personalizationis denied by default
Google product tags load with consent types defaulted to denied
Access the website on which you have deployed the Didomi widget with a Google Consent mode v2 (Advanced) implementation and let the widget load on the page. It is important that you do not interact with the widget yet.
Open the browser console and select the Network tab. Use the provided search filter to check requests that contain the following for the gcd parameter:
analytics.js
gtag
collect

Ensure the consent status values for each consent type within the gcd parameter matches the expected default settings.
Google product tags update to show consent types set to denied due to end-user choice
Access the website on which you have deployed the Didomi widget with a Google Consent mode v2 (Advanced) implementation and let the widget load on the page. Deny consent for all vendors and purposes.
Open the browser console and select the Network tab. Check the requests for your Google products to ensure the consent status value for each consent type within the gcd parameter is set to denied due to end-user choice.

Google product tags update to show consent types set to granted due to end-user choice
Access the website on which you have deployed the Didomi widget with a Google Consent mode v2 (Advanced) implementation and let the widget load on the page. Grant consent for all vendors and purposes.
Open the browser console and select the Network tab. Check the requests for your Google products to ensure the consent status value for each consent type within the gcd parameter is set to granted due to end-user choice.

In this tab, we will cover how to test your organization's Google Consent Mode v2 (Advanced) implementation via Google Tag Manager.
Navigate to the container where you configured and published Google Consent Mode v2 (Advanced) in your Google Tag Manager account and click Preview.

Use the provided field to input the URL of your website on which the Didomi widget is implemented. Click Connect when finished.

Google product tags load with consent types defaulted to configuration
Let the consent notice load in the subsequent window of the tag assistant. It is important that you do not interact with the widget yet.
Ensure that your Google product tags are not firing until the didomi-ready event.

While still viewing the didomi-ready event, click the Consent tab. Ensure that the values in the On-page default column reflect your organization's configured consent state defaults for each consent type.

Google product tags update to show consent types set to denied due to end-user choice
Let the widget load in the subsequent window of the tag assistant. Deny consent for all vendors and purposes.
Select events related to the deny consent action from the left-hand column and click the Consent tab. Ensure that the values in the On-page Update column are set to Denied (except for security_storage.

Google product tags update to show consent types set to granted due to end-user choice
Let the widget load in the subsequent window of the tag assistant. Grant consent for all vendors and purposes.
Select events related to the accept consent action from the left-hand column and click the Consent tab. Ensure that the values in the On-page Update column are set to Granted.

How your organization tests depends on the integrations configure and tools available for your mobile application. In this tab, we will cover how validations that your organization should perform in order to check default and updated signals are set and sent correctly.
Enable debug logs
Activate verbose logging in Didomi SDK via:
Android
iOS
If integrated with Firebase, enable Firebase DebugView via:
Android
iOS
Launch with -FIRDebugEnabled argument
Testing criteria
Analyze the logs and network payloads for each criterion to ensure the expected results are set for the appropriate field.
Test best practices
Test your application across multiple regions and regulations
Verify behavior on first app launch and after end-user consent actions
Always use real SDK builds and not mocks for final validation
Last updated