0

I'm setting up Firebase for a mobile app. I'm finding conflicting information on Firebase's definition of a session on Google documentation as well as stackoverflow itself.

Firebase documentation and stackoverflow state that I should use "SetMinimumSessionDuration" to define the metric—however this parameter has recently been marked as Depracated (see https://firebase.google.com/docs/reference/unity/deprecated/deprecated).

It is mentioned that "a session is initiated when an app is opened in the foreground" (see https://support.google.com/firebase/answer/9191807?hl=en), but I am not confident that this webpage has been published recently and is still valid.

Does anybody have solid info on how Firebase sets this metric?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Could you please clarify what you want to actually achieve? Do you want to know what is session and how it works or how to set session duration? – michalbrz Aug 30 '19 at 20:30
  • How to set a session duration (if there's not definition that's set in stone!) – Aaron Kurz Sep 02 '19 at 09:02
  • I would really recommend to not think in terms of "session" in context of Firebase. It is very event-driven, so I would advise to think about what you want to achieve in terms of *events*. – michalbrz Sep 02 '19 at 11:27

1 Answers1

0

Before Jan 2019 (Analytics version 16.3.0), the default value for minimum session duration was 10 seconds. The session_start event was triggered if there was no current session, and the app was in the foreground for more than 10 seconds.

After Jan 2019, it was changed so that the session_start event is triggered as soon as the app is foregrounded. The SetMinimumSessionDuration parameter is now deprecated and can no longer be changed. See The Firebase Blog.

However, when you run a SQL query in BigQuery, you should be able to specify a minimum duration of a session for the purpose of analysis. Here's a post to get you started with such queries.

You can also still change the setSessionTimeoutDuration parameter to control the duration of inactivity that terminates the current session (default: 30 minutes).

Kai Lukoff
  • 21
  • 5