What Is A Session In Google Analytics 4?

A session in Google Analytics 4 is a period of time during which a user interacts with your website or app. By default, a session starts when a user views a page or opens your app in the foreground and no session is currently active, and it ends after 30 minutes of user inactivity. Google automatically collects a session_start event at the beginning of each session and assigns a session ID and session number. Understanding how GA4 defines sessions helps you interpret your traffic reports and spot anomalies in user behaviour.

How GA4 Defines A Session

Google Analytics 4 starts a session when a user either opens your app in the foreground or views a page or screen and no session is currently active. By default, a session ends after 30 minutes of user inactivity, but there is no limit to how long a session can last. The moment a session begins, GA4 automatically collects a session_start event. This event carries two important parameters: ga_session_id and ga_session_number.

The ga_session_id is a timestamp in seconds that identifies the session. To uniquely identify a session across users, combine it with user_id or user_pseudo_id. Google suggests this join when you analyse sessions outside Google Analytics. The ga_session_number tells you which session this is for the user, for example, their third or fifth visit. Both values are automatically attached to every subsequent event in the session when you use gtag.js or the Google Analytics for Firebase SDK. If you send events via Measurement Protocol or Data Import, you need to pass the session ID manually; it is not added automatically.

Sometimes the session_start event itself may not carry the session ID, for instance when the event is filtered out from a subproperty. In that case, Analytics still generates a session ID behind the scenes. The session_start event also includes parameters like client_id, page_location, page_referrer, and traffic_type. Google notes that session_start carries the information that decides the session's attribution, such as the gclid, UTM parameters and referrer.

GA4 calculates the total number of sessions by estimating the count of unique session IDs using the HyperLogLog++ algorithm. This estimation method is efficient and accurate, but it means session counts in reports may differ slightly from the exact counts you get by querying raw data in BigQuery. The algorithm was applied to data back through October 2021, so reports covering earlier periods will not show session metrics. You can still access older session data by filtering your event report for event=session_start.

To view session counts in GA4, go to Reports > Engagement > Engagement overview. You can also use the Sessions report to filter and segment sessions. For more on the events that power your data, see GA4 Events Explained. Learn more about sessions in the Google Analytics help center.

When A Session Ends

A GA4 session ends when a user is inactive for a set period. The default timeout is 30 minutes, but you can adjust it. There is no maximum session duration: a user could stay on a page for hours and it remains one session as long as they keep interacting before the timeout elapses.

For web sessions, inactivity means no new events are sent. For app sessions, the timeout begins when the app moves to the background. However, you can extend an app session while the app is in the background by including the parameter extend_session with a value of 1 on events you send. This is useful for apps that are frequently used in the background, for example, music apps. You can also change the default app session timeout programmatically with the setSessionTimeoutDuration method.

Unlike Universal Analytics, GA4 does not restart a session at midnight or when new campaign parameters appear. In UA, a session would break if the clock struck midnight or if a user arrived via a new UTM-tagged link. GA4 ignores those boundaries. A session continues as long as the inactivity threshold is not crossed. Google lists both as reasons session counts differ between UA and GA4, especially for global audiences or sites that use UTMs on their own links.

The maximum session timeout you can set for a web data stream is 7 hours and 55 minutes. You change this value in the data stream settings (see the section on changing the timeout below). The engaged session timer, which controls how many seconds of activity count toward an engaged session, is adjusted in the same panel. By default, a session becomes engaged after 10 seconds, but you can set a longer threshold if needed.

Keep in mind that a session timeout change only affects future data. If you shorten the timeout, users who were previously counted in one long session might now be split into multiple sessions, which can inflate session counts and lower engagement rate.

Short on time? Analytics Art can check this in your property for you.

Sessions Vs Engaged Sessions

Not every session counts as an engaged session. GA4 draws a line between a simple visit and one that shows meaningful interaction. An engaged session meets at least one of three criteria:

  • It lasts longer than 10 seconds.
  • It includes at least one key event (a conversion).
  • It has at least 2 pageviews or screenviews.

If a user lands on a page and leaves within 10 seconds without triggering a key event or viewing a second page, that session is not engaged. It is essentially a bounce, although GA4 reports bounce rate differently than UA. Engaged sessions are the foundation of the engagement rate metric, which is the percentage of sessions that were engaged.

The table below summarises the difference:

CriteriaSessionEngaged Session
DurationAny lengthLonger than 10 seconds
Key eventNot requiredAt least one key event
Pageviews / screenviewsAt least oneAt least two

You can find session and engaged session metrics in several GA4 reports, including the Engagement overview and Acquisition overview. In Explorations, you can pull in both metrics to compare them side by side. The Sessions report under Engagement lets you filter and segment sessions to focus on specific types. If you want to calculate engagement rate yourself, divide engaged sessions by total sessions.

Changing the engaged session timer (the seconds threshold) in the data stream settings will shift the boundary. For instance, if you set it to 20 seconds, a session must last longer than 20 seconds to be engaged. This can lower your reported engagement rate. For a detailed breakdown of engagement metrics, read Engaged Sessions And Engagement Rate In GA4.

Why Session Counts Differ From Universal Analytics

When you compare session counts between a Universal Analytics property and a GA4 property, you will almost always see a discrepancy. Several design changes explain the gap.

First, UA restarts a session at midnight based on the view timezone. GA4 does not. If you have users spread across timezones, UA could inflate session counts by splitting a single visit into two sessions when the clock resets. Second, UA starts a new session whenever a user arrives with new campaign parameters, even if they were already on the site. GA4 ignores campaign changes mid-session. If you use UTM tags on internal links, UA creates extra sessions that GA4 will not count.

Third, UA reporting views often apply filters that exclude certain data. GA4 properties do not have views; they use data filters at the property level. If a filter removes the session_start event from a subproperty, GA4 still generates a session ID, so the session may still be counted. Fourth, GA4 uses the HyperLogLog++ algorithm to estimate unique session IDs, while UA counted sessions directly from hits. This estimation is highly accurate but introduces a small variance, so session counts in reports may differ slightly from exact counts in BigQuery. BigQuery exports, however, show the exact session count because BigQuery does not apply the estimation.

Attribution windows differ too. GA4 attributes sessions with the non-direct last click model and the key event lookback window, 90 days by default: if a user arrives via organic search on day 1 and returns directly on day 68, both sessions are attributed to google / organic. In UA, the matching window was the Campaign timeout setting, 6 months by default. These attribution differences also affect session-based acquisition metrics.

The table below shows how session counts can vary between GA4 reports and BigQuery while still showing the same trend:

SourceLast week (sessions)This week (sessions)
Reports1,4631,828 (+25%)
BigQuery1,5011,876 (+25%)

For more on how UTM parameters affect sessions, see UTM Parameters: What They Are And How GA4 Reads Them. To learn about exporting raw data to BigQuery, visit How To Export GA4 Data To BigQuery. For a detailed comparison, see the metrics comparison guide.

Changing The Session Timeout

You can adjust the session timeout for a web data stream directly in the GA4 admin interface. The maximum value is 7 hours and 55 minutes. Here are the exact steps:

  1. Sign in to Google Analytics and select Admin.
  2. In the Property column, click Data streams.
  3. Select the web data stream you want to modify.
  4. Scroll to the bottom and click Configure tag settings.
  5. In the Settings section, click Show all to expand the full list.
  6. Click Adjust session timeout.
  7. Under Adjust session timeout, set the timeout in hours and minutes.
  8. Under Adjust timer for engaged sessions, enter the number of seconds that must pass before a session is considered engaged (default is 10).
  9. Click Save.
Click path: Admin then Data streams then Web stream then Configure tag settings then Show all then Adjust session timeoutAdminData streamsWeb streamConfigure tag settingsShow allAdjust session timeout
The Adjust session timeout screen inside a web data stream settings.

The change applies to all future data; it does not retroactively alter past sessions. For app streams, you use the setSessionTimeoutDuration method in the Firebase SDK. You can also extend background sessions with the extend_session parameter.

Be cautious when shortening the timeout. A lower threshold can break long user sessions into multiple smaller sessions, which may inflate your session count and make engagement metrics look worse. Conversely, a longer timeout can merge separate visits into one session, reducing session count. Always note the change and monitor your reports afterwards. The engaged session timer works independently: raising it means fewer sessions qualify as engaged, which lowers your engagement rate.

Frequently Asked Questions

How Does GA4 Define A Session?

A session starts when a user opens your app or views a page and no session is currently active. GA4 automatically generates a session_start event with a unique session ID (ga_session_id) and session number. The session ends after 30 minutes of inactivity by default. All subsequent events in that session are linked to the same session ID.

When Does A Session End By Default In GA4?

By default, a session ends after 30 minutes of user inactivity. There is no maximum session length. For apps, the timeout starts when the app moves to the background, but you can extend it with the extend_session parameter. Sessions do not restart at midnight or when new campaign parameters are encountered.

What Is An Engaged Session In GA4?

An engaged session is one that lasts longer than 10 seconds, includes at least one key event, or has at least 2 pageviews or screenviews. If a session does not meet any of these criteria, it is not engaged. Engaged sessions are used to calculate engagement rate.

How Do I Find Total Sessions In GA4?

Go to Reports > Engagement > Engagement overview. The Sessions metric appears there. You can also open the Sessions report under Engagement to filter and segment session data. In Explorations, you can add the Sessions metric to any custom report.

Why Do Session Counts Differ Between Universal Analytics And GA4?

UA restarts sessions at midnight and on new campaign parameters; GA4 does not. UA uses view filters that may exclude data, while GA4 estimates sessions with the HyperLogLog++ algorithm. These differences, plus UTM usage on internal links, cause discrepancies.

How Can I Change The Session Timeout In GA4?

In Admin, select Data streams, choose your web stream, then go to Configure tag settings > Show all > Adjust session timeout. Set the timeout in hours and minutes and save. For apps, use the setSessionTimeoutDuration method in the Firebase SDK.

What Is The Maximum Session Timeout In GA4?

The maximum session timeout for a web data stream is 7 hours and 55 minutes. You can set any value up to that limit. The engaged session timer (seconds to qualify as engaged) is adjusted separately in the same panel.