androidgoogle-analyticsfirebase-analytics

How are Android apps supposed to gather Analytics consent status for users in the EEA, any library to do it or do I need to implement custom UI?


So, if I press the "Set up consent mode" button, it just redirects to the Set up consent mode for apps page, which only shows that we can:

Add the following to the manifest:

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

and call the following methods on FirebaseAnalytics isntance:

Firebase.analytics.setConsent {
  analyticsStorage(ConsentStatus.GRANTED)
  adStorage(ConsentStatus.GRANTED)
  adUserData(ConsentStatus.GRANTED)
  adPersonalization(ConsentStatus.GRANTED)
}

But there’s no explanation about any UI to ask the user for this consent. How is this supposed to work?

My country is not part of the European Economic Area (EEA), so I’ve never seen any UI in Android apps asking for this kind of consent, including many Google Android apps. Can anyone show a real example, especially from a Google app?

Also, are there any libraries that automatically detect if a user is within the EEA (checking IP address?) and show a proper consent screen to ask for this?

For example, I know about the Google User Messaging Platform (UMP) SDK for AdMob. But what about Analytics Consent? Is there an equivalent SDK or recommended approach?

enter image description here

Update

Google provides one illustration but still mentions the following:

The visual representation below is for illustrative purposes only and should not be considered legal guidance.

enter image description here


Solution

  • There's no real need in the sdks that would serve a UI for that since it's a low effort to make a simple ui to ask for permissions but you'd also probably like to include that in your app's settings to let the users to change their initial decision. and no SDK would seamlessly integrate that into your settings.

    Some of the privacy services provide those SDKs, but they do it only to be able to claim native app integration in their marketing, whereas realistically, you don't wanna use it.