Google Consent Mode 2.0 (GDPR Standard - mobile)

   Permission: Vendor list - GDPR

Google Consent Mode 2.0 ensures that Google vendors on your property comply with an end-user's consent choices for purposes (called consent checks) defined by Google. When a mobile app user indicates their consent choices, tags with consent checks adjust their behavior, and user consent choices are preserved across their interaction with the mobile app.

In this article, we will cover how to configure the integration between Sourcepoint and Google Consent Mode 2.0 for a mobile property that is running a GDPR Standard campaign.  

  Note: Be advised that Google Consent Mode 2.0 only impacts your organizations if you use one or more of the following Google products:

  • Google Ads
  • Google Analytics
  • Search Ads 360
  • Campaign Manager 360
  • Display & Video 360

Consent check overview

Consent check(s) indicates the kind of storage a Google vendor uses.  An end-user can deny or grant the collection of this data. Please refer to the table below for the different consent checks available in Google Consent Mode 2.0:

Consent check Values Description
ad_storage granted | denied Enables storage (such as cookies) related to advertising.
analytics_storage granted | denied Enables storage (such as cookies) related to analytics (e.g. visit duration).
ad_user_data granted | denied Set to granted when end-user has consented to have their data shared with Google. 
ad_personalization granted | denied Set to granted when the user has consented to have their data shared with Google for the purposes of ad personalization.

Google Analytics for Firebase SDK

Google Consent Mode 2.0 utilizes Google Analytics for Firebase SDK for mobile app implementations. To integrate Google Consent Mode 2.0 into your mobile application, your organization will need to set the default consent state for Google consent checks in your app's info.plist file and utilize a setConsent method to update the respective consent checks. Visit out mobile SDKs for more information.

 Sourcepoint mobile SDKs

setConsent method in app

Ensure that you are utilizing the setConsent method in your mobile app to update all the Google consent checks used by your Google products.

//iOS example
func onSPFinished(userData: SPUserData) {
    let gcmData = userData.gdpr?.consents?.googleConsentMode
        .analyticsStorage: gcmData?.analyticsStorage == .granted ? .granted : .denied,
        .adStorage: gcmData?.adStorage == .granted ? .granted : .denied,
        .adUserData: gcmData?.adUserData == .granted ? .granted : .denied,
        .adPersonalization: gcmData?.adPersonalization == .granted ? .granted : .denied,
//Android example
override fun onSpFinished(sPConsents: SPConsents) {
    // Set consent types.
    val gcmData = sPConsents.gdpr?.consent?.googleConsentMode
    val consentMap = mapOf(
      ConsentType.ANALYTICS_STORAGE to if(gcmData?.analyticsStorage == GCMStatus.GRANTED) ConsentStatus.GRANTED else ConsentStatus.DENIED,
      ConsentType.AD_STORAGE to if(gcmData?.adStorage == GCMStatus.GRANTED) ConsentStatus.GRANTED else ConsentStatus.DENIED,
      ConsentType.AD_USER_DATA to if(gcmData?.adUserData == GCMStatus.GRANTED) ConsentStatus.GRANTED else ConsentStatus.DENIED,
      ConsentType.AD_PERSONALIZATION to if(gcmData?.adPersonalization == GCMStatus.GRANTED) ConsentStatus.GRANTED else ConsentStatus.DENIED

Add Google product vendors to vendor list

From the GDPR Standard vendor list associated with your property, add Google vendors that your organization works with (e.g. Google Advertising Products, Google Firebase, Google Analytics, etc...).

Screenshot 2024-02-14 at 11.38.35 AM.png

Configure custom purposes for Google Consent Mode 2.0

Your organization will finally need to create custom purposes for your GDPR Standard vendor list that map to the consent checks used by the Google products running on your property.

Click + Add Custom Purpose from the vendor list builder page. Use the provided modal to input a name for the custom purpose. 

Use the Google Consent Mode Category dropdown menu to select a consent type to which this custom purpose will map. Click Create purpose when finished.


As a best practice, Sourcepoint recommends that you describe the Google products that currently rely on the purpose.

Navigate to the newly created custom purpose and click the custom purpose name.


Use the provided description field to note the Google products utilizing the custom purpose as part of the Google Consent Mode integration. Click Apply changes when finished.

Screenshot 2024-02-05 at 3.56.07 PM.png

Set the legal basis for the custom purpose to User Consent as necessary for your vendors. 

Screenshot 2024-02-14 at 11.40.59 AM.png

Repeat as necessary for other consent types used by Google products on your property. 

Click Save to confirm the updates to your vendor list. Your Sourcepoint and Google Consent Mode 2.0 integration setup is complete. 

Test integration

In order to test that the correct consent checks are being passed to the Google Firebase SDK when the appropriate  purposes are consented/rejected, Sourcepoint suggests that you enable verbose logging on your device. 

In Xcode, select Product > Scheme > Edit Scheme.

From the subsequent modal, select Run from the left-hand panel and then navigate to the Arguments tab.

Screenshot 2024-02-13 at 9.12.45 AM.png

Add the following arguments under Arguments Passed on Launch:

  • -FIRAnalyticsVerboseLoggingEnabled
  • -FIRAnalyticsDebugEnabled

Screenshot 2024-02-13 at 9.11.33 AM.png

Run your app and events will display in the Xcode debug console. Search for any of Google consent checks in the console to see how the consent checks are being set.

Screenshot_2024-02-13_at_9_40_23 AM.jpg

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.