How to get correct User count and Avg. Session Duration in Firebase Analytics?

I am new to Firebase Analytics. We are having an issue with the number of Users count and its effect on Retention and Avg. Session Duration numbers for our Flutter App.

The number of users shown by Firebase is way more than what we actually have. As mentioned here it seems that Firebase Analytics considers every app installation as a unique user (there are many app re-installs by the development team). We have recently added the setUserID property as mentioned here so that Firebase can correctly identify a user.

My questions are:

  1. With setUserID set, will Firebase Analytics correctly provide the user count, retention and avg. session duration numbers?
  2. Is there a way to either clear the previous users or not consider the incorrect number of users (due to re-installs) after the new analytics related to setUserID starts working?

We need to get the correct number of users, Avg. Session Duration and Retention Numbers. Can you please help with how can we achieve it?


Solution 1:

  1. Yes. In GA4 Settings you can set up how you want default reporting look like. Go to Settings > Property > Reporting Identity.

-> If you choose "By User-ID and device" GA4 will automatically count all your reports with user_id - if present, if not then GA4 use his device id (= user_pseudo_id)

-> One more thing to notice, you are talking about you want to see "Avg. session duration" - keep in mind that Firebase by default takes sessions as 30 minutes long. If you want to modify length of session, see docs and call method setSessionTimeoutDuration https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#setSessionTimeoutDuration(long)

  1. No. Setup new GA4 property as production one and this old one use as "staging" / "testing".