Adding Google Analytics in Angular/Ionic 4 app

We’re using Ionic v4 in our Angular app and wanting to integrate Google Analytics. I am confused on which is the best Google product to use, specifically between Google Analytics and Firebase. Since the app is web based, I’m not sure if I should create a normal site tracking in GA or a “mobile app.” Then once I have the Google part set up, do I use normal tracking code in my app or use a plugin like google-analytics-plugin?

If I should create a mobile app, it looks like I need to set up Firebase for the app. Does anyone have recommendations on the steps to do this? I’m not sure where I would get the tracking IDs, and if I need to create separate Firebase apps for different platforms?

I’d appreciate any help. Thanks!

We ended up using Firebase for analytics. Google Analytics (web) won’t work as we want to track native events, and the native Google Analytics SDK for native integrations is being deprecated in favor of Firebase.

We’re using the Cordova plugin for all Firebase features which includes Firebase Analytics.

This blog post was helpful:

1 Like

@rbender FYI
cordova-plugin-firebase has since been discontinued. See
it is recommended to use cordova-plugin-firebasex instead, which is a fork based on this plugin but it’s actually being maintained.
Hope it helps.