Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Firebase Analytics define a session?

Firebase Analytics has a number of stats around "Sessions" (like "Sessions per user" and "Average session length"), but how exactly does Firebase Analytics define a session?

like image 847
Todd Kerpelman Avatar asked Dec 08 '16 01:12

Todd Kerpelman


People also ask

What defines a session in Google Analytics?

The period of time a user is active on your site or app. By default, if a user is inactive for 30 minutes or more, any future activity is attributed to a new session. Users that leave your site and return within 30 minutes are counted as part of the original session.

How are sessions calculated in Google Analytics 4?

How the number of sessions is calculated. Analytics calculates the number of sessions that occur on your site or app by estimating the number of unique session IDs.

What does Firebase Analytics allow you to do?

Analytics surfaces data about user behavior in your iOS and Android apps, enabling you to make better decisions about your product and marketing optimization. View crash data, notification effectiveness, deep-link performance, in-app purchase data, and more.

How do I know if Firebase Analytics is working?

In the Firebase console, open your project. Select Analytics from the menu to view the Analytics reporting dashboard. The Events tab shows the event reports that are automatically created for each distinct type of event logged by your app.


2 Answers

And I'll answer my question by saying that Firebase Analytics defines a session as a user engaging with your app for a minimum amount of time (10 seconds by default) followed by your user not engaging with your app for a certain amount of time (30 minutes by default). But you can change those times if you'd like something different.

So if a user starts using your app, switches to messaging to send a message, goes back to your app, switches to messaging again to send a quick selfie, then goes back to your app, that's all considered just one session.

Similarly if a user accidentally taps on your app icon and then quickly switches away to open up the app they actually meant to open, that won't get recorded as a session.

like image 187
Todd Kerpelman Avatar answered Sep 29 '22 10:09

Todd Kerpelman


Adding to Todd Kerpelman's response above, you can customize the definition of a session via FirebaseAnalytics.setSessionTimeoutDuration(long millis).

The docs are at: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics

(Sorry, don't have the reputation to make this a comment)

[EDIT: removed obsolete reference to setMinimumSessionDuration]

like image 45
Dan Morenus Avatar answered Sep 29 '22 11:09

Dan Morenus