Google Consent Mode - implementation steps
Didomi now supports native integrations with Firebase and AAP SDKs. Use this new guide for a simplified setup.
In the code of your Mobile app make sure you no longer setConsent for Google consent mode.
Enable GCM and Set Initial Default Status
Go to the Didomi Console and login
Open Consent notices > choose your App notice
Go to Customization > Integrations > Consent Modes, and Enable Google Consent Mode V2
Enabling Consent Mode v2 will also add the Google vendors: Google Advertising Products (IAB id =
755
) and Google analytics (didomiId = googleana-4TXnJigR
).To enable Google consent mode integration, you must enable at least one of the two vendors, otherwise a warning message will be displayed
You can select either the Google Analytics products vendor, or Google Advertising Products, or both vendors.
Choose your implementation mode - Basic vs Advanced
For basic mode: Google consent signals must be disabled by default when your app loads and user's consent is not yet collected. To configure basic mode, you can leave the default settings with the boxes already un-checked.
For advanced mode: check the item "Enable ad_storage..." to be able to make a specific choice on each of the associated sub-options. Checked sub-options indicate that the status will be set to granted when the app initially loads and user's consent is not yet collected.
For example, if you enable "Enable ad_storage before user gives consent", on your Mobile App, the initial status for ad_storage will be set to granted only if the user's consent is not yet collected.
Enable Native Integration with Firebase
Why Enable Didomi × Firebase Integration?
Firebase acts as Google’s core SDK for apps.
Enabling this 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.
Steps to Enable in Didomi Console
Go to the Didomi Console and login
Open Consent notices > choose your App notice
Go to Customization > Integrations > Consent Modes, and Enable Google Consent Mode V2
Enable the option "Tracking App conversion with Firebase and Google's AAP partners"
Select Firebase:
Enable Native Integration with AAP SDKs
App Attribution Partners (AAP) like Branch, Airbridge, and Kochava need to receive accurate consent signals to comply with privacy regulations and forward these signals to Google. Didomi manages the calculation and mapping of these signals automatically when you enable the respective integrations.
Airbridge Integration
Enable Airbridge in Didomi Console
Same as indicated for Firebase, you can enable Airbridge integration in the Didomi Console:
How It Works
When Airbridge is enabled in the Didomi Console and the Airbridge SDK is detected in the app, Didomi computes the appropriate Google Consent Mode signals and shares them with Airbridge.
For 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 such as adPersonalizationConsent
and adUserDataUsageConsent
, which are based on your configuration in the Didomi SDK. Once the user provides their consent through the CMP, Didomi updates these signals and ensures that Airbridge reflects the user’s actual preferences.
For users outside the EEA, Didomi signals that the user is not in a GDPR-regulated region by setting eeaRegion
to false
.
Branch Integration
Enable Branch in Didomi Console
Same as indicated for Firebase, you can enable Branch integration in the Didomi Console.
How It Works
When Branch is enabled in the Didomi Console and the Branch SDK is present in your app, Didomi manages the Google Consent Mode signal propagation for Branch. For users in GDPR-regulated regions, Didomi indicates compliance context by setting eea
to 1
and applies default values for consent signals such as adPersonalization
and adUserData
, based on your configuration in the console. After the user provides consent, Didomi recalculates the status of these signals using the user’s consent for the Google Advertising Products vendor (google) and updates Branch accordingly.
For users outside GDPR regions, Didomi sets eea
to 0
to indicate that no GDPR obligations apply.
Kochava Integration
Enable Kochava in Didomi Console
Same as indicated for Firebase, you can enable Kochava integration in the Didomi Console.
How It Works
When Kochava integration is enabled, 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 user consent, the consent string is shared with Kochava through Didomi, provided that the SDK is configured to send installs or events after the 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.2 or the Global Privacy Platform API v1.1.
Code Examples
Below are basic examples of enabling Google Consent Mode using Didomi SDK and Firebase.
Example: Firebase x Didomi
Enabling Consent mode's TCF integration
You can optionally enable Consent mode's TCF integration which will allow setting consent mode status from the user’s choice in the TC string.
Consent mode's TCF integration is only valid when you use both TCF integration and Google's Consent mode.
It is only valid for advertising consent types:
ad_storage
ad_user_data
andad_personalization.
It does not apply to
analytics_storage.
As of now, ad_user_data is only compatible with IAB purpose 7 (“Measure advertising performance”) being used in consent legal basis for the Vendor Google Advertising Products.
To enable this integration:
Login to the Didomi Console.
Go to Consent notices and select your Mobile App consent notice.
Navigate to Customization -> Integrations -> Advertising.
Make sure the Consent mode integration checkbox is selected.
Select the option "Enable IAB TCF integration with Google Consent Mode". Click on Save.
Add the publisher restriction for IAB Purpose #7 on the Vendor Google Advertising Products. To do so:
Navigate to Regulations -> GDPR -> Edit vendors & purposes
Go to TCF settings -> IAB TCF Publisher Restrictions
Click "Add restriction"
Choose purpose "Measure advertising performance"
Un-select "All IAB vendors".
Select "Google Advertising Products" vendor.
Scroll down to Restriction and choose "Require consent for selected vendors".
Publish your notice.
As a result:
When user consent is collected on your CMP, the Didomi SDK will setup the
IABTCF_EnableAdvertiserConsentMode
key onNSUserDefaults
(iOS) andShared Preferences
(Android) totrue
.Consent mode status for
ad_storage
ad_user_data
andad_personalization
will then be calculated from the status of TCF purposes in the TC string, as defined in this documentation.analytics_storage
is not impacted by Consent mode's TCF integration, and must be covered by Firebase integration documented above.
Last updated