Engaged sessions
Engagement rate tells you what share of sessions GA4 counts as engaged. It only makes sense per session, and event data makes that easy to get wrong.
How it works
Engagement is a property of a session. Combine all the engagement signals of a session into one true or false value, then divide the engaged sessions by all sessions.
- GA4 counts a session as engaged when it lasted more than ten seconds, or had two or more page views, or had at least one key event.
session_engagedcarries that decision, so you do not recompute it. - Normalize the integer and string forms of
session_engagedthat the export contains. - Use a session-level aggregate such as
MAXover a Boolean or 0/1 flag. SAFE_DIVIDEavoids an error when the denominator is zero.
Common mistake
Counting events with a true flag measures engaged events, and an active session adds to it many times. The numerator must count distinct engaged sessions.
Worked example
WITH raw_events AS (
SELECT 's1' AS session_id, 1 AS engaged_int, CAST(NULL AS STRING) AS engaged_string UNION ALL
SELECT 's1', 0, NULL UNION ALL
SELECT 's2', NULL, '1' UNION ALL
SELECT 's3', 0, '0'
), session_flags AS (
SELECT session_id, MAX(CASE WHEN engaged_int = 1 OR engaged_string = '1' THEN 1 ELSE 0 END) AS engaged
FROM raw_events GROUP BY session_id
)
SELECT SAFE_DIVIDE(COUNTIF(engaged = 1), COUNT(*)) AS engagement_rate
FROM session_flagsThe raw events use integer and string encodings. MAX turns either truthy form into one flag per session.
Sessions s1 and s2 are engaged and s3 is not, so the rate is two thirds.