[GA4] Session calculation

In Google Analytics 4, a session is initiated when an app is opened in the foreground or when a webpage is opened. There is no limit to how long a session can last.

If a session crosses a day boundary, for example, if it starts at 11:55 pm and ends at 12:05 am, it is considered a single session, though it is counted once for each day.

A session ends after 30 minutes of inactivity on the part of the user.

An app session begins to time out when an app is moved to the background, but you have the option to extend that session by logging the extend_session parameter (with a value of 1) on events logged while the app is in the background. This is useful if your app is frequently used in the background, (e.g. as with navigation and music apps.)

You can override the default timeout of 30 minutes for an app session by using the setSessionTimeoutDuration method. There is currently no equivalent option for web sessions.

Events that are logged during the span of a session are associated with that session in two ways:

  • ga_session_id: a unique session identifier associated with each event that occurs within a session.
  • ga_session_number: a parameter associated with each event that occurs within a session that identifies the ordinal position of a session as it relates to a user, e.g., a user's 1st or 5th session. This is useful for identifying when specific types of events occur, for example, to determine that in_app_purchase events occur 85% of the time during the 5th to 7th session.

Differences in session counts between Google Analytics 4 and Universal Analytics

You may see lower session counts in Google Analytics 4 because Google Analytics 4 does not create a new session when the campaign source changes mid session, while Universal Analytics does create a new session under that circumstance.

Where to see session metrics

There are 3 session related metrics in Google Analytics 4 properties:

  • Sessions: The number of sessions that began on your site or app (the session_start event was triggered).
  • Engaged sessions: The number of sessions that lasted 10 seconds or longer, or had 1 or more conversion events or 2 or more page views.
  • Engaged sessions per user: The number of engaged sessions / the number of users

You can see those metrics in the following reports:

  • Acquisition overview
  • User acquisition
  • Traffic acquisition
  • Engagement overview
  • Demographic details
  • Tech details
Was this helpful?
How can we improve it?