Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase User Opt Out of Analytics

With Firebase Analytics, is it possible to configure it so that a user can set a preference and opt-out of being tracked?

like image 577
dmfrey Avatar asked Jun 07 '16 18:06

dmfrey


People also ask

How do I turn off Firebase Analytics?

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.

How do I turn off Google Analytics flutters?

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.

Should I use Firebase Analytics or Google Analytics?

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.

How do I stop Firebase app indexing?

File -> Settings -> Plugins -> Firebase App Indexing -> uncheck. Restart Android Studio and it will be gone.


1 Answers

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.

like image 69
djabi Avatar answered Oct 24 '22 04:10

djabi