1
votes

I have added the FCM dependency in app-level build.gradle file as below:

implementation 'com.google.firebase:firebase-messaging:15.0.2'

I am successfully getting the push notification. But FCM console is showing some of the Analytics data. I don't want to collect any kind of data.

Q. 1 I have not added the dependency for firebase analytics then why the console is showing analytics data?

Q. 2 Does firebase-messaging dependency auto enables the firebase analytics without adding dependency of analytics?

Q. 3 I have not added the google-services.json file into my project and i am initializing the firebase programmatically and now I am getting the below error:

E/FA: Missing google_app_id. Firebase Analytics disabled.

Here message shows that Analytics is disabled. Is this disabled due to app_id not found? or how it gets disabled automatically? Note: I have not added <meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" /> yet.

Q. 4 Any official documentation which says that Firebase message dependency automatically collects some event and data (without adding dependency of firebase analytics)

1

1 Answers

3
votes
  1. Firebase Cloud Messaging automatically logs the receipt of certain types of messages to Analytics. In those cases, you can currently see the analytics data in the notifications section of the Firebase console.
  2. Yes. Analytics is part of the core Firebase SDK, which all other Firebase SDKs depend on.
  3. It seems that the Analytics module is disabled when it can't find its configuration data during startup.

  4. For more information on automatically collected events, see Automatically collected events. To disable automatic collection of events, see Disable Analytics Collection.