# Google Consent Mode - implementation steps

{% hint style="success" %}
**Didomi now supports native integrations with Firebase and** [**AAP SDKs**](https://support.google.com/google-ads/answer/12961402?hl=en)**. Use** [**this new guide**](https://developers.didomi.io/cmp/mobile-sdk/google-consent-mode/google-consent-mode-implementation-steps) **for a simplified setup.**

**In the code of your Mobile app make sure you no longer** [**setConsent**](#update_consent) **for Google consent mode.**
{% endhint %}

## **Enable GCM and Set Initial Default Status**

1. Go to the Didomi Console and login
2. Open Consent notices > choose your App notice
3. Go to Customization > Integrations > Consent Modes, and Enable Google Consent Mode V2
4. Enabling Consent Mode v2 will also add the Google vendors: Google Advertising Products (IAB id = `755`) and Google analytics (`didomiId = googleana-4TXnJigR`).

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>To enable Google consent mode integration, you must enable at least one of the two vendors, otherwise a warning message will be displayed</p></div>
5. You can select either the Google Analytics products vendor, or Google Advertising Products, or both vendors.\
   ![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-aa75ee261c5d8a11846a2c23837181b24661726e%2Fimage.png?alt=media)
6. 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.\
     ![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-ab964f8c2df5307540e285a203fbd91b0c4da926%2FScreenshot%202025-07-23%20at%2009.17.33.png?alt=media)
   * 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.\
       ![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-cbc82c2f4280a99ecd78bb50353216dc42730b97%2Fimage.png?alt=media)

***

## **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**

1. Go to the Didomi Console and login
2. Open Consent notices > choose your App notice
3. Go to Customization > Integrations > Consent Modes, and Enable Google Consent Mode V2
4. Enable the option "Tracking App conversion with Firebase and Google's AAP partners"
5. Select Firebase:

   <figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-594cb8e18dd007d6ddacb116cfa083ed61d51e3d%2FScreenshot%202025-07-23%20at%2009.24.22.png?alt=media" alt=""><figcaption></figcaption></figure>

***

## **Enable Native Integration with AAP SDKs**

[App Attribution Partners (AAP)](https://support.google.com/google-ads/answer/12961402?hl=en) like **Airbridge, AppsFlyer, Branch** 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:\
![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-a8c83428933a7aa9720f8d3dfa094a611ff8d788%2Fimage.png?alt=media)

**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`.

***

### **AppsFlyer Integration**

**Enable AppsFlyer in Didomi Console**

Same as indicated for Firebase, you can enable AppsFlyer integration in the Didomi Console.

**How It Works**

When AppsFlyer is enabled in the Didomi 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 `isUserSubjectToGDPR` to `true` and applies default values for consent signals such as `hasConsentForDataUsage` , `hasConsentForAdsPersonalization` and `hasConsentForAdStorage`, 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 AppsFlyer accordingly.
* For users outside of GDPR jurisdiction, Didomi will set `isUserSubjectToGDPR` to `false` .
* If you have enabled [Consent mode's TCF integration](#enabling-consent-modes-tcf-integration), 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 in `SharedPreferences`

***

### **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.

***

## 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](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details).

{% hint style="warning" %}

* 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` and `ad_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.
  {% endhint %}

To enable this integration:

1. Login to the Didomi Console.
2. Go to Consent notices and select your Mobile App consent notice.
3. Navigate to Customization -> Integrations -> Advertising.
4. Make sure the Consent mode integration checkbox is selected.
5. Select the option "Enable IAB TCF integration with Google Consent Mode". Click on Save.\\

   <figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-ed4c5d56a1e08ddb48755f9ae3a7636d92487263%2FScreenshot%202025-07-23%20at%2009.29.30.png?alt=media" alt=""><figcaption></figcaption></figure>
6. Add the publisher restriction for IAB Purpose #7 on the Vendor Google Advertising Products. To do so:
   1. Navigate to Regulations -> GDPR -> Edit vendors & purposes
   2. Go to TCF settings -> IAB TCF Publisher Restrictions
   3. Click "Add restriction"

      <figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-01a3d92f60f0f0c8c0d0584f2c69207c3d41fe0d%2FScreenshot%202024-07-16%20at%2011.33.11.png?alt=media" alt=""><figcaption></figcaption></figure>
   4. Choose purpose "Measure advertising performance"
   5. Un-select "All IAB vendors".
   6. Select "Google Advertising Products" vendor.\
      ![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-050728a2bea13728be0a89cfe4c29ed3fe8f0777%2FScreenshot%202024-07-16%20at%2011.36.05.png?alt=media)
   7. Scroll down to Restriction and choose "Require consent for selected vendors".\
      ![](https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2Fgit-blob-7cca0d5c0f83cebd126b5b21e8f38d4920ac5a4a%2FScreenshot%202024-07-16%20at%2011.40.39.png?alt=media)
7. Publish your notice.

As a result:

* When user consent is collected on your CMP, the Didomi SDK will setup the `IABTCF_EnableAdvertiserConsentMode` key on `NSUserDefaults` (iOS) and `Shared Preferences` (Android) to `true` .
* Consent mode status for `ad_storage` `ad_user_data` and `ad_personalization` will then be calculated from the status of TCF purposes in the TC string, as defined in [this documentation](https://developers.google.com/tag-platform/security/guides/implement-TCF-strings?hl=en#tcf_integration_behavior).
* `analytics_storage` is not impacted by Consent mode's TCF integration, and must be covered by [Firebase integration documented above](#why-enable-didomi-firebase-integration).
