Sub topic 9
Engaged sessions and engagement rate
This chapter assumes you know what a GA4 event and a session are, and that you can read basic JavaScript and SQL. Earlier chapters covered how GA4 derives sessions from events. Here we look at how GA4 decides that a session was "engaged" and how that decision produces engagement rate and related metrics.
Why GA4 measures engagement
Universal Analytics used bounce rate. A bounce was a session with only one pageview. A visitor who read a long article for ten minutes and then left still counted as a bounce.
GA4 replaces that idea with engagement. A session is either engaged or not. A visitor who reads a long article and leaves is engaged, even if they viewed a single page.
What makes a session engaged
A session is an engaged session if it meets at least one of three conditions:
- It lasts longer than 10 seconds.
- It includes at least one key event (a conversion).
- It includes at least two page or screen views.
The 10-second threshold is the default. You can change it in the data stream settings for web streams, from 10 seconds up to 60 seconds. The key event and view conditions are fixed.
GA4 does not store the result as a separate event. It evaluates the conditions while it processes the session and marks the session as engaged. The session_engaged value is sent with events and exposed in the BigQuery export as an event parameter.
How engagement time is measured
On the web, the gtag.js library and Google Tag Manager measure how long the page is in the foreground. The timer runs while the browser tab is visible and in focus. It stops when the user switches tabs or minimizes the window. The library reports the accumulated time in an engagement_time_msec parameter. It attaches the parameter to events such as user_engagement, which fires when the user leaves the page or moves to another one.
In apps, the Firebase SDK measures time with the app in the foreground in the same way.
This has two consequences:
- A page left open in a background tab does not build engagement time.
- Engagement time is a property of events, so a session where no event carries
engagement_time_msechas no measured engagement.
Engagement metrics
GA4 builds several metrics on the engaged session flag.
| Metric | Definition |
|---|---|
| Engaged sessions | Count of sessions that met at least one engagement condition |
| Engagement rate | Engaged sessions divided by total sessions |
| Bounce rate | Sessions that were not engaged divided by total sessions |
| Average engagement time | Total engagement time divided by active users |
| Engaged sessions per user | Engaged sessions divided by active users |
Bounce rate is exactly 1 - engagement rate. GA4 introduced it back as a reporting metric, but it is defined as the complement of engagement rate, not as a count of single-page visits.
A worked example
Suppose a property has 1,000 sessions on one day:
- 400 sessions lasted longer than 10 seconds.
- 150 additional sessions lasted 10 seconds or less but had two page views.
- 50 additional sessions were shorter than 10 seconds with one page view, but included a key event.
- 400 sessions had one page view and left in under 10 seconds.
Engaged sessions are 400 + 150 + 50 = 600. Engagement rate is 600 / 1,000 = 60%. Bounce rate is 400 / 1,000 = 40%.
The next diagram shows the decision for a single session.
Engagement and the event model
Engagement is derived data, in the same way that sessions are. You do not send an "engaged" event. You send ordinary events, and GA4 applies the rules. This means your tracking choices change engagement rate.
- Adding or removing page views. Single-page applications that do not send a
page_viewon route changes will undercount views. Fewer sessions meet the two-view condition. - Marking a key event. Each key event you add makes more sessions engaged. If you mark a very common event, such as
scroll, as a key event, almost every session that triggers it becomes engaged. Engagement rate rises without any change in visitor behavior. - Changing the timer. Raising the engaged-session threshold from 10 to 30 seconds lowers engagement rate for sessions that depend on the time condition. The change applies to data collected after you save it. It does not rewrite history.
Sending engagement time with the Measurement Protocol
If you send events from a server with the Measurement Protocol, GA4 has no browser timer to rely on. You need to supply engagement_time_msec yourself, or the events may not contribute to engagement or active users. The following example shows a request body that includes it. The session ID links the event to an existing session.
// Send a server-side event that carries engagement time and a session ID
const measurementId = 'G-XXXXXXXXXX';
const apiSecret = 'YOUR_API_SECRET';
const body = {
client_id: '555.1234567890',
events: [
{
name: 'tutorial_step_completed',
params: {
session_id: '1700000000',
engagement_time_msec: 1500,
step_number: 3
}
}
]
};
fetch(
`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`,
{
method: 'POST',
body: JSON.stringify(body)
}
).then((response) => console.log(response.status));An engagement_time_msec value of 1 or more on an event is also what makes the user count as active, as the next chapter explains.
Where engagement rate appears and how to read it
Engagement rate appears in the Reports section, in the traffic acquisition report, and in Explorations. You can slice it by any dimension that applies at session scope, such as session source or medium, device category, or landing page.
Read it with these points in mind:
- Compare similar traffic. A newsletter reader who comes for one article may have a different rate than someone from a search ad. A low rate is not always a problem. A page that answers a question quickly may be working as intended.
- Check the denominator. Rates from very small session counts swing widely. Use a minimum volume before drawing conclusions.
- Check the definition of a view. Rate comparisons between two properties are only valid if both send page views in the same way.
Querying engagement in BigQuery
In the BigQuery export, each event row can carry a session_engaged event parameter. For a session, the value is the string '1' when the session is engaged. You can compute engagement rate by grouping events into sessions and checking whether any event in the session reports engagement.
-- Engagement rate per day from the GA4 BigQuery export
WITH sessions AS (
SELECT
event_date,
CONCAT(
user_pseudo_id,
'.',
CAST((SELECT ep.value.int_value
FROM UNNEST(event_params) AS ep
WHERE ep.key = 'ga_session_id') AS STRING)
) AS session_key,
MAX(IF(
(SELECT ep.value.string_value
FROM UNNEST(event_params) AS ep
WHERE ep.key = 'session_engaged') = '1',
1, 0)) AS is_engaged
FROM `my-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20240101' AND '20240131'
GROUP BY event_date, session_key
)
SELECT
event_date,
COUNT(*) AS sessions,
SUM(is_engaged) AS engaged_sessions,
SAFE_DIVIDE(SUM(is_engaged), COUNT(*)) AS engagement_rate
FROM sessions
GROUP BY event_date
ORDER BY event_date;The query takes the highest engagement flag seen on any event in the session. It groups by event_date as well as the session key, so a session that crosses midnight is counted once on each day. Your numbers may then differ slightly from the GA4 interface, which counts such a session once, on the day it started. Rows with a null ga_session_id, such as some Measurement Protocol events, are grouped into one null-keyed session per day and should be filtered out if you want clean results.
Edge cases
- Sessions with no engagement signal. An event sent with no engagement time and no second view leaves a session non-engaged. Measurement Protocol events often fall into this group.
- Late key events. If the key event occurs 40 minutes into a session that expires after 30 minutes of inactivity, it belongs to a new session. The first session is judged on its own.
- Data thresholds and sampling. Small cohorts can be hidden by data thresholds in the interface. BigQuery exports do not apply these thresholds.
- Processing delay. Reports can take up to 24 to 48 hours to settle. Engagement rate for the most recent day may change.
Exercises
Exercise
A property has 2,000 sessions in a day. 900 lasted longer than 10 seconds. Of the remaining 1,100, 300 had two or more page views, 100 had a key event but only one view, and 700 had one view and no key event. What are the engagement rate and bounce rate?
Show answer
Engaged sessions are 900 + 300 + 100 = 1,300, so engagement rate is 1,300 / 2,000 = 65%. Bounce rate is the complement, 700 / 2,000 = 35%.
Exercise
A single-page application never sends a page_view event when the user moves between routes. Visitors browse several routes in about 8 seconds, then leave. How will GA4 classify these sessions, and how can you fix the tracking?
Show answer
GA4 sees one page view and a duration under 10 seconds, so the sessions are not engaged and count toward bounce rate. To fix it, send a page_view event (or a virtual page view with the new page location) on each route change so the two-view condition can be met.
Exercise
Why can a long-lived tab that a user left open overnight still avoid inflating engagement time?
Show answer
Engagement time is measured only while the page is in the foreground and visible. A background tab does not accumulate engagementtimemsec, so the idle hours are not counted.