Newbie question: How to do analytics?

I have many years of experience building websites but now I’m building my first iOS/Android app with Ionic.

I’m using Drupal 9 as the backend and Ionic React for the frontend.

On the web, I’ve always used Google Analytics. For apps, what’s the “standard” practice? I found the Firebase Analytics plugin for Capacitor; is this the “go to” solution?

The only Google Analytics plugins I could find were for Cordova, but my app is running with Capacitor 3 now, and it seems Ionic is dedicated to replacing Cordova with Capacitor.

Any info would be much appreciated. I’m trying to research this but it’s difficult to find current information instead of from a couple years ago (prior to the release of GA4).

I’d also like to know what analytics packages / services people have used successfully with Ionic, particularly any other than Google Analytics and Firebase.

I’d also be interested to know whether they gather usage analytics even when the user is offline.

My search came up with this just-published Mixpanel Capacitor plugin

…as well as an older Mixpanel Cordova plugin

…and mention of using Adobe Analytics with Ionic.

Author of the mixpanel-capacitor plugin here–we have had success with the older cordova plugin for the most part. It can be clunky at some points, has a lot of build warnings and deprecations, and uses an older version of the MixpanelSwift library.

I made the new plugin (@houseninja/capacitor-mixpanel) to get the latest/more optimized mixpanel native libraries, and to have more control/confidence in the plugin builds, and importantly, to track from application boot (the cordova plugin does not do this).

It’s been working fine for about a week now in production, but as you’ve discovered already @tetsuwanadam , there are still some bugs :slight_smile:

To answer your question about offline analytics: it does appear to keep a queue of tracking events if the user goes offline here or there, and forwards them all on reconnection. All mixpanel sdks (ios, android, web) offer this by default.