Skip to content

Google Consent Mode

Google Consent mode helps you to obtain your users consent and pass it to Google seamlessly. Consequently, Google tools adjust their behaviors automatically. Google further supplements this by filling gaps through conversion modeling and behavioral modeling, aiding you in achieving your marketing goals. For mobile applications, this is crucial to ensure the proper functioning of Google Analytics for Firebase.

Note

Those who do not have consent mode enabled will not be able to capture new EEA users in their audiences starting from March 2024.

To successfully incorporate Google Consent Mode V2 into your mobile application, there are a few essential steps to ensure a seamless integration process.

  1. SDK Version: Make sure your application uses our SDK with minimum version 2.11.0.

  2. Activate the Usercentrics Consent Mediation Feature: Enable the consent mediation feature for our SDK, and make sure to include the Google Analytics for Firebase template ID in your configuration. Refer to the specific set of the documentation for detailed instructions.

  3. Add Firebase Analytics Library to your app:

    iOS

    Use the minimum version of 10.17.0. Please refer to its guide for detailed instructions on integration.

    Finally, in your Info.plist file add the consent mode key value pairs. Assign true or false values to the keys to establish default permission. More information can be found here.

    <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE</key> <false/>
    <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE</key> <false/>
    <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA</key> <false/>
    <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS</key> <false/>
    

    Android

    Use the minimum version of 21.5.0 or 32.5.0 if you want to use the Firebase Android BoM. Please refer to its guide for detailed instructions on integration.

    Finally, add the consent mode key value pairs. You can find more information here.

    <meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="false" />
    <meta-data android:name="google_analytics_default_allow_ad_storage" android:value="false" />
    <meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="false" />
    <meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />
    

That's it! 🚀 we will now apply the consent mode to Firebase Analytics SDK.

Basic vs Advanced Mode

Google delineates its implementation strategies into two categories: Basic and Advanced modes. Usercentrics SDK exclusively operates within the realm of Advanced Implementation, ensuring a comprehensive integration.

Our approach ensures no SDK is restricted from operating within any app or game.

Following the guidance above, Google SDKs will intuitively recognize the default consent status (preset to false). Concurrently, upon activation of Consent Mediation and subsequent user consent, Usercentrics SDK seamlessly initiates any requisite API calls.

This streamlined process facilitates a harmonious operation between consent management and functionality, enhancing user experience and compliance. 🚀