Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Differentiate Staging/Dev and Production Build for Android/IOS in Google Firebase for Analytic and Crash

Recently I have Added the my Android and iOS project to Firebase with alpha version.I want to See different Analytic and Crash for Staging and Production. Can anyone help on this. Thanks

like image 451
Madhav Sharma Avatar asked Dec 06 '25 06:12

Madhav Sharma


2 Answers

You have several options, depending upon what your needs are. The bottom line is that you should, at the very least, assign different application IDs to the different variants of your app, so they can be separate in the Firebase Console. You can have multiple apps per project (each assigned a different ID), or multiple projects with an app in each one, depending upon what works best for your team and your app.

The actual implementation can get complicated from here on out, so I suggest you read this blog post to learn about the options for your Android app, and how it affects the operation of the various Firebase features in that app.

like image 169
Doug Stevenson Avatar answered Dec 08 '25 01:12

Doug Stevenson


I think of 2 ways to do so:

  1. Using app version + date range: If you know your app in staging was version X from day N to N+10, you can select theses filter in Firebase analytics to display only the analytics coming from that configuration. This also work for crash reporting.
  2. I prefer: Using a remote config & user property:

    • Setup in remote config a key as "environment" with some values like "alpha", "beta", "prod". You can then specify the value per platform/app version.
    • On the phone, read that value in remote config and track a user property in Firebase Analytics that reflect that value.
    • Finally in the Firebase console you can filter by user property (& app version if necessary).

    With this option, when you move an app version out of alpha to beta (for instance) you just need to go in remote config, and change the value for that app version to "beta". This solution doesn't work for crash reporting.

like image 22
Sistr Avatar answered Dec 08 '25 01:12

Sistr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!