[GA4] How the number of sessions is calculated

A session initiates when a user either:

  • Opens your app in the foreground
  • Views a page on your website and no session is currently active (e.g. their previous session has timed out)

By default, a session ends (times out) after 30 minutes of user inactivity. There is no limit to how long a session can last.

Adjust app session timeout

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 including an extend_session parameter (with a value of 1) with events you send 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.)

Change the default timeout of 30 minutes for app sessions via the setSessionTimeoutDuration method. 

Adjust web session timeout

Change the default timeout of 30 minutes for web sessions as follows: 

  1. In Admin, navigate to the property whose web sessions you want to configure.
  2. Click Data Streams and select your web data stream.
  3. Under Additional Settings, click More Tagging Settings, then Adjust session timeout.
  4. Adjust session timeout: set the session timeout in hours and minutes.
  5. Adjust timer for engaged sessions: select the number of seconds it takes for a session to be considered an engaged session.
  6. Click Save.

How sessions are counted

The session counts in your Google Analytics 4 property may be lower than the session counts in your Universal Analytics property. This is 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.

If a session crosses a day boundary (e.g. 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.

How events are associated with a session

Events are associated with a 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.

How users, sessions, and events are connected

Analytics organizes users, sessions, and events in a hierarchy:

  • User
    • Session
      • Event

Each user who visits a site or app can initiate multiple sessions over time, such as the session when you acquire a new user or a session when a user returns to your site or app. Events are user interactions on your site or app, and they're associated with each session.

For example, a new user views a shirt on your site and then leaves. The user returns one hour later to purchase the shirt. In the first session, the user triggers a view_item event. In the second, the user triggers a view_item and purchase event (among other events). Analytics associates the view_item event with each session.

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?
Clear search
Close search
Google apps
Main menu
Search Help Center