Todd Kerpelman
Todd Kerpelman

Reputation: 17523

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?

Upvotes: 21

Views: 17675

Answers (2)

Dan Morenus
Dan Morenus

Reputation: 1088

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]

Upvotes: 12

Todd Kerpelman
Todd Kerpelman

Reputation: 17523

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.

Upvotes: 28

Related Questions