Hello,
I’m trying to add Firebase analytics to my application (v5).
Previously I have added GoogleService-Info.plist
in ios\App\App
and google-services.json
in android\app
.
My app use Angular Fire (17.0.2) for several features and is initialized using provideFirebaseApp(() => initializeApp(environment.firebaseConfig)
.
Firebase analytics works on iOS and this is unrelated to AngularFire, because AngularFire is for web, and in the analytics dashboard, users shows up correctly with iOS tag (even iOS version).
I’m assuming it’s because Firebase Analytics in built-in somehow.
But this doesn’t work on Android and I couldn’t make it works in a similar way, without any additional package.
My first question is: Is it possible to have firebase analytics in Android without added package / modifying heavily the Java code ?
In the meantime, I tried to use the Capacitor plugin "@capacitor-firebase/analytics": "5.4.1"
.
In android/app/build.gradle
I have added
apply plugin: 'com.google.gms.google-services'
and also
implementation 'com.google.firebase:firebase-analytics:21.5.0'
In android/build.gradle
I have added
classpath 'com.google.gms:google-services:4.3.15'
I still don’t see Android users appearing in the Realtime active users counter when I open the app on Android.
My second question is: What mistake I have made adding this plugin?
My third question is: If I’m able to successfully had this plugin, is there any conflict between the current way my iOS users are getting tracked and having in addition a package that have the same purpose ?
Thank you very much for your help.