> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/cmp/mobile-sdk/google-consent-mode/google-consent-mode-implementation-steps.md).

# Implement Google Consent Mode v2 (mobile)

{% hint style="warning" %}
**Note**: Didomi has updated its support since the release of Google Custom Mode v2 with simplified native integrations with Firebase and Advanced App Partners (AAP) like Airbridge, ApplyFlyer, etc...

Organizations who have implemented the previous Google Consent Mode v2 solution via the `setConsent` method should update their implementations via the instructions below and remove `setConsent` for Google Consent Mode v2 from the application code.
{% endhint %}

In this article, we will cover how to configure Google Consent Mode v2 on a mobile consent notice in the Didomi portal.

Navigate to a mobile consent notice, click the **Customization** tab and select **Integrations**

<figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2FsIzH37n9udqCsgsktLqB%2FScreenshot%202026-03-12%20at%207.10.42%E2%80%AFAM.png?alt=media&amp;token=7679d4ce-c52e-4a8a-937d-a4d437da1d90" alt="" width="563"><figcaption></figcaption></figure>

Click **Consent Modes** and enable the toggle inline with **Google Consent Mode v2**.

<figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2FmhyTw2lGiBkq8DUVfT6q%2FScreenshot%202026-03-12%20at%207.13.02%E2%80%AFAM.png?alt=media&amp;token=3e7291ae-324e-4ddd-9440-bfff9d764d8d" alt="" width="563"><figcaption></figcaption></figure>

Enabling the toggle will automatically add the Google Advertising Product vendor (`google`) and Google Analytics Products vendor (`googleana-4TXnJigR`) to the consent notice.&#x20;

{% hint style="info" %}
In order to successfully implement Google Consent Mode v2 on the mobile consent notice, your organization will **need** to have Google Advertising Products and/or Google Analytics Products depending on the Google products your organization utilizes. See: [Mobile implementation overview](/cmp/mobile-sdk/google-consent-mode.md#mobile-implementation-overview) for more information
{% endhint %}

Click **Ok, add the vendors** in the subsequent modal.

<figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2FrqCz8E1u3pAbE8Oa4nxq%2FScreenshot%202026-10-27%20at%203.07.29%E2%80%AFPM.png?alt=media&amp;token=c3c621ad-2bfd-4296-8c7e-cf2967c16fa4" alt="" width="352"><figcaption></figcaption></figure>

Expand the Google Consent Mode v2 accordion to configure the details of the integration. How your organization configures the details of the integration will depend on whether your organization is utilizing Basic vs Advanced consent mode.

{% tabs %}
{% tab title="Basic" %}
In the basic version of Google Consent Mode v2, Google products should be blocked by your organization from loading until an end-user interacts with your consent notice on the website. Once the end-user interacts with the consent notice, one of the following can occur:

<table data-header-hidden><thead><tr><th width="166"></th><th></th></tr></thead><tbody><tr><td>Consent</td><td>If an end-user grants consent then Google product will load and execute the consent mode APIs. </td></tr><tr><td>No Consent</td><td>If an end-user does not grant consent then no data is transmitted to Google (not even a default consent state). Google products will remain blocked and Google Consent mode's modeling for ads will be based on a general model.</td></tr></tbody></table>

Review the table below for information on each toggle in the integration configuration:

<table><thead><tr><th width="188">Toggle</th><th>Description</th></tr></thead><tbody><tr><td>Set the default status of Google Consent Mode when the page loads</td><td>The basic version of Google Consent Mode v2 will block Google product tags an end-user interacts with your consent notice.<br><br><mark style="background-color:$danger;">Ensure this toggle is <strong>de-activated</strong> to ensure no default status is set for the basic version.</mark></td></tr><tr><td>Enable Google Advertising Products</td><td><p>Will add Google Advertising Products vendor (API ID: <code>google</code>) to the consent notice. Designed to encompass Google products who utilize one or more of the following consent types:</p><ul><li><code>ad_storage</code></li><li><code>ad_user_data</code></li><li><code>ad_personalization</code></li><li><code>functionality_storage</code></li><li><code>personalization_storage</code></li><li><code>security_storage</code></li></ul></td></tr><tr><td>Enable <strong>{consent type}</strong> before user gives consent</td><td>For each consent type, will override the default status of the Google consent type and set it to <code>granted</code> as soon as the Google product tag loads.<br><br><mark style="background-color:$danger;">With Google Consent Mode v2 (Basic), Google product tags will be blocked until the end-user grants consent and not even the consent state is sent to Google. These settings <strong>do not</strong> need to be enabled.</mark></td></tr><tr><td>Enable Google Analytics Products</td><td>Will add Google Analytics Products vendor (API ID: <code>googleana-4TXnJigR</code>) to the consent notice. Designed to encompass Google products who require the <code>analytics_storage</code> consent type.</td></tr><tr><td>Enable TCF integration with Google Consent Mode</td><td><p>Enables Didomi to set an additional flag (<code>TCData.enableAdvertiserConsentMode</code> to <code>true</code>) for <code>getTCData</code> and <code>addEventListener</code> commands.<br><br>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:</p><ul><li><code>ad_storage</code></li><li><code>ad_user_data</code></li><li><code>ad_personalization</code></li></ul><p><a href="https://developers.google.com/tag-platform/security/guides/implement-TCF-strings?hl=en#tcf_integration_behavior">Click here</a> for more information on how Google calculates the mapping between IAB TCF purposes and Google consent types.<br><br><mark style="background-color:$warning;"><strong>Note</strong>: The TCF integration with Google Consent Mode does not support Google product tags that require the <code>analytics_storage</code>, <code>functionality_storage</code>, <code>personalization_storage</code>, or <code>security_storage</code> consent types.</mark><br><br>For Google products that require the <code>analytics_storage</code> consent type, Didomi will set this consent type to <code>granted</code> if the end-user consents globally (consent to vendor and all of its purposes) for Google Analytics Products (API ID: <code>googleana-4TXnJigR</code>).</p></td></tr><tr><td>Firebase</td><td><p>Firebase is the core SDK for Google apps. Once enabled, the integration ensures:</p><ul><li>proper mapping of Didomi consent signals to Firebase</li><li>automatic propagation to Google SDKs for measurement and advertising</li><li>simplified compliance for GDPR and similar regulations</li></ul></td></tr><tr><td>Branch</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like Branch need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>When Branch is enabled in the console and the Branch SDK is present in your app, Didomi manages the Google Consent Mode signal propagation for Branch. </p><p></p><p>For end-users in GDPR-regulated regions, Didomi indicates compliance context by setting <code>eea</code> to <code>1</code> 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.</p><p></p><p>For users outside GDPR regions, Didomi sets <code>eea</code> to <code>0</code> to indicate that no GDPR obligations apply. </p></td></tr><tr><td>Kochava</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP) </a>like Kochava need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>When Kochava is enabled in the console, 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. </p><p></p><p>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 user has given consent.</p><p></p><p>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 &#x26; Consent Framework (TCF) v2.3 or the Global Privacy Platform API v1.1.</p></td></tr><tr><td>Airbridge</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like Airbridge need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>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.</p><p></p><p>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 <code>eeaRegion</code> to <code>true</code>. 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.</p><p></p><p>For end-users outside the EEA, Didomi signals that the end-user is not in a GDPR-regulated region by setting <code>eeaRegion</code> to <code>false</code>.</p></td></tr><tr><td>AppsFlyer</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like AppsFlyer need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>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.</p><ul><li>For users in GDPR-regulated regions, Didomi indicates compliance context by setting <code>isUserSubjectToGDPR</code> to <code>true</code> 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 AppsFlyer accordingly.</li><li>For users outside of GDPR jurisdiction, Didomi will set <code>isUserSubjectToGDPR</code> to <code>false</code> .</li><li>If you have enabled <strong>IAB TCF integration with Google Consent Mode</strong>, Didomi will automatically instruct AppsFlyer to use the TC string by setting <code>enableTCFDataCollection(true)</code> . As a result, AppsFlyer can directly get the user's consent from the TC string in <code>SharedPreferences</code></li></ul></td></tr></tbody></table>

<figure><img src="https://1703900661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDh8ZWDZrXs8sc4QKEQ%2Fuploads%2FZmXJycpw9RakG2WhhGsz%2FScreenshot%202026-03-12%20at%208.33.47%E2%80%AFAM.png?alt=media&amp;token=4d7745a9-d580-486c-a0a6-36b1974c446c" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Advanced" %}
In the advanced version of Google Consent Mode v2, Google products still load when an end-user accesses your app (unlike the basic version). Google products will load the consent mode API and do the following:

* Set default consent states for [consent types](broken://pages/mcXR7vNOCKSqRSbDLIij#google-consent-types). By default, consent may be `denied`, unless your organization sets its own default values. While consent is `denied`, the Google product sends [cookieless pings](https://support.google.com/google-ads/answer/10000067#Pings).
* Wait for end-user interaction with the consent notice and update consent states accordingly. Only when an end-user grants consent to data collection, will Google products send the full measurement data. [Learn more about tag behavior](https://support.google.com/analytics/answer/9976101#behavior).

Review the table below for information on each toggle in the integration configuration:

<table><thead><tr><th width="188">Toggle</th><th>Description</th></tr></thead><tbody><tr><td>Set the default status of Google Consent Mode when the page loads</td><td><p>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 <code>denied</code> unless configured otherwise below. </p><p></p><p>Enable this toggle to ensure this default status is set for the advanced version.</p></td></tr><tr><td>Enable Google Advertising Products</td><td><p>Will add Google Advertising Products vendor (API ID: <code>google</code>) to the consent notice. Designed to encompass Google products who utilize one or more of the following consent types:</p><ul><li><code>ad_storage</code></li><li><code>ad_user_data</code></li><li><code>ad_personalization</code></li><li><code>functionality_storage</code></li><li><code>personalization_storage</code></li><li><code>security_storage</code></li></ul></td></tr><tr><td>Enable <strong>{consent type}</strong> before user gives consent</td><td><p>For each consent type, will override the default status of the Google consent type and set it to <code>granted</code> as soon as the Google product tag loads. </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Consult with your organization's legal counsel and DPO before enabling any of these settings.</mark></p></td></tr><tr><td>Enable Google Analytics Products</td><td>Will add Google Analytics Products vendor (API ID: <code>googleana-4TXnJigR</code>) to the consent notice. Designed to encompass Google products who require the <code>analytics_storage</code> consent type.</td></tr><tr><td>Enable TCF integration with Google Consent Mode</td><td><p>Enables Didomi to set an additional flag (<code>TCData.enableAdvertiserConsentMode</code> to <code>true</code>) for <code>getTCData</code> and <code>addEventListener</code> commands.<br><br>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:</p><ul><li><code>ad_storage</code></li><li><code>ad_user_data</code></li><li><code>ad_personalization</code></li></ul><p><a href="https://developers.google.com/tag-platform/security/guides/implement-TCF-strings?hl=en#tcf_integration_behavior">Click here</a> for more information on how Google calculates the mapping between IAB TCF purposes and Google consent types.<br><br><mark style="background-color:$warning;"><strong>Note</strong>: The TCF integration with Google Consent Mode does not support Google product tags that require the <code>analytics_storage</code>, <code>functionality_storage</code>, <code>personalization_storage</code>, or <code>security_storage</code> consent types.</mark><br><br>For Google products that require the <code>analytics_storage</code> consent type, Didomi will set this consent type to <code>granted</code> if the end-user consents globally (consent to vendor and all of its purposes) for Google Analytics Products (API ID: <code>googleana-4TXnJigR</code>).</p></td></tr><tr><td>Firebase</td><td><p>Firebase is the core SDK for Google apps. Once enabled, the integration ensures:</p><ul><li>proper mapping of Didomi consent signals to Firebase</li><li>automatic propagation to Google SDKs for measurement and advertising</li><li>simplified compliance for GDPR and similar regulations</li></ul></td></tr><tr><td>Branch</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like Branch need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>When Branch is enabled in the console and the Branch SDK is present in your app, Didomi manages the Google Consent Mode signal propagation for Branch. </p><p></p><p>For end-users in GDPR-regulated regions, Didomi indicates compliance context by setting <code>eea</code> to <code>1</code> 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.</p><p></p><p>For users outside GDPR regions, Didomi sets <code>eea</code> to <code>0</code> to indicate that no GDPR obligations apply. </p></td></tr><tr><td>Kochava</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like Kochava need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>When Kochava is enabled in the console, 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. </p><p></p><p>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 user has given consent.</p><p></p><p>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 &#x26; Consent Framework (TCF) v2.3 or the Global Privacy Platform API v1.1.</p></td></tr><tr><td>Airbridge</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like Airbridge need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>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.</p><p></p><p>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 <code>eeaRegion</code> to <code>true</code>. 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.</p><p></p><p>For end-users outside the EEA, Didomi signals that the end-user is not in a GDPR-regulated region by setting <code>eeaRegion</code> to <code>false</code>.</p></td></tr><tr><td>AppsFlyer</td><td><p><a href="https://support.google.com/google-ads/answer/12961402?hl=en">App Attribution Partners (AAP)</a> like AppsFlyer need to receive accurate consent signals to comply with privacy regulations and forwards these signals to Google.</p><p></p><p>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.</p><ul><li>For users in GDPR-regulated regions, Didomi indicates compliance context by setting <code>isUserSubjectToGDPR</code> to <code>true</code> 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 AppsFlyer accordingly.</li><li>For users outside of GDPR jurisdiction, Didomi will set <code>isUserSubjectToGDPR</code> to <code>false</code> .</li><li>If you have enabled <strong>IAB TCF integration with Google Consent Mode</strong>, Didomi will automatically instruct AppsFlyer to use the TC string by setting <code>enableTCFDataCollection(true)</code> . As a result, AppsFlyer can directly get the user's consent from the TC string in <code>SharedPreferences</code></li></ul></td></tr></tbody></table>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.didomi.io/cmp/mobile-sdk/google-consent-mode/google-consent-mode-implementation-steps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
