Firebase Analytics
This plugin is still in beta stage and may not work as expected. Please submit any issues to the plugin repo.
1
$ ionic cordova plugin add cordova-plugin-firebase-analytics
2
$ npm install @awesome-cordova-plugins/firebase-analytics
Copied!
Cordova plugin for Firebase Analytics
Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.

Using capacitor?

For Android you'll have to add in android/app/src/main/AndroidManfiest.xml under <application>
1
<meta-data
2
tools:replace="android:value"
3
android:name="firebase_analytics_collection_enabled"
4
android:value="true"/>
5
​
6
<meta-data
7
tools:replace="android:value"
8
android:name="google_analytics_automatic_screen_reporting_enabled"
9
android:value="false"/>
Copied!
And in the same file, you'll have to add xmlns:tools="http://schemas.android.com/tools" to your manifest tag.

Supported platforms

  • Android
    • iOS