Guides › Kotlin (Android) › Google Analytics for Firebase
Firebase Analytics in a Kotlin (Android) app: privacy policy & Data safety
In a Kotlin (Android) app, Firebase Analytics comes in through com.google.firebase:firebase-analytics in build.gradle or libs.versions.toml. Google collects the data below, but the store treats it as your app's collection: you declare it in Data safety and name Google in your privacy policy.
What to declare
| Data | Purpose | Google Play Data safety |
|---|---|---|
| Device identifiers identifiers for your device or app installation, such as an advertising ID or push token | Analytics | Device or other IDs › Device or other IDs Shared: No |
| App interactions how you use the app, such as screens viewed and features used | Analytics | App activity › App interactions Shared: No |
| Approximate location your approximate location, for example derived from your IP address | Analytics | Location › Approximate location Shared: No |
| Purchase history information about purchases and subscriptions you make in the app | Analytics | Financial info › Purchase history Shared: No |
| Data safety: shared with third parties? | No |
|---|
Kotlin (Android) notes
Analytics logs in-app purchase events automatically, which is why Purchase history is in the table. If you set a user ID with setUserId, the data becomes linked to the user — declare it as linked in App Privacy.
Collect only after consent (optional)
If you ask users first — required for analytics in some regions — turn automatic collection off, then enable it after consent:
- Android:
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />inAndroidManifest.xml - After consent:
Firebase.analytics.setAnalyticsCollectionEnabled(true)
Privacy policy text
This is the line StoreOK puts in the "Third-party services" section of your policy:
Google Analytics for Firebase (Google) for app usage analytics. Privacy policy
The policy also has to describe the data itself (the rows above), how long you keep it, and how users can ask for deletion. See a full example.
Using more than Firebase Analytics? Drop your build.gradle — StoreOK detects every SDK and writes the policy and Data safety answers to match. Read in your browser, no signup.
Firebase Analytics in other frameworks
firebase_analyticsReact Native@react-native-firebase/analyticsExpo@react-native-firebase/analyticsSwiftUI (iOS)firebase-ios-sdkOther SDKs in Kotlin (Android)
Based on Google's and the framework's public documentation and our SDK mapping. SDK behaviour changes between versions and configurations — verify against your own setup. This is not legal advice.