With Firebase Analytics, is it possible to configure it so that a user can set a preference and opt-out of being tracked?
If you need to deactivate Analytics collection permanently in a version of your app, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES (Boolean) in your app's Info.
In summary, to disable temporarily, set FIREBASE_ANALYTICS_COLLECTION_ENABLED to NO in the GoogleServices-Info. plist file. To disable permanently, set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED to YES in the same plist file.
Generally, if you are solely focused on creating and developing apps, Firebase is the best option for your business. It is mobile-forward and focused on the development of mobile apps. This will work better for an app-focused company. If you only have a website, Google Analytics is the best option.
File -> Settings -> Plugins -> Firebase App Indexing -> uncheck. Restart Android Studio and it will be gone.
You can default Firebase Analytics to disabled by adding the following meta-data to the application element in your AndroidManifest.xml:
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
To enable Firebase Analytics per individual instance you can then call:
FirebaseAnalytics.getInstance(context).setAnalyticsCollectionEnabled(true);
Once you make the call the value is persisted on the device and will remain in effect until you make another call to setAnalyticsCollectionEnabled
. Once set the value has effect on all events logged after the call from any process or thread on the device. If your app is using multiple processes you only need to make the call once. More details in official guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With