Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Analytics, re-enable Advertising Id collection

Firebase Analytics for android has a metadata for the manifest to disable data collection before the user's consent

<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />

To re-enable collection, such as after an end-user provides consent there is the method

setAnalyticsCollectionEnabled(true);

To limit only the collection of the advertising id there is the metadata to add to the manifest

<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

Then, to rehabilitate the collection of the advertising id, after the user's consent is there a dedicated method? Or is it okay to continue to use setAnalyticsCollectionEnabled(true);

like image 370
Nicola De Fiorenze Avatar asked Oct 18 '25 12:10

Nicola De Fiorenze


1 Answers

setAnalyticsCollectionEnabled(true) doesn't influence setting google_analytics_adid_collection_enabled. Once you disable advertising id collection in the manifest file, there is no way to enable it programatically.

like image 94
michalbrz Avatar answered Oct 20 '25 02:10

michalbrz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!