Update time: June 23, 2025
Not all metrics in GA4 are calculated based on actual quantities, some are estimated.
Why are there Estimated Metrics?
Measuring exact distinct counts (i.e. cardinality) for large datasets requires significant memory and affects performance. GA4 use HyperLogLog++ (HLL++) algorithm to estimate cardinality for most used metrics including Sessions、Active Users and Total Users.
The impact of Estimated Metrics
There are two main effects of Estimated Metrics:
- Estimated Metrics differ from actual indicators
- The values of the same metrics in different reports may be different. Read more: Active users in Different Reports in GA4 are Inconsistent
Introduction to Estimated Metrics
The Estimated Metrics in GA4 include Sessions、Active Users and Total Users
Sessions
GA4 calculates the number of sessions that occur on your site or app by estimating the number of unique session IDs.
Calculation in BigQuery: The ga_session_id
event parameter identifies individual unique sessions for each user. The combination of user_pseudo_id
and ga_session_id
will be unique across your dataset for unique sessions. This is the standard method of counting sessions for Google Analytics 4 properties. For sessions, precision
is 12.
SELECT HLL_COUNT.EXTRACT( HLL_COUNT.INIT( CONCAT( user_pseudo_id, (SELECT `value` FROM UNNEST(event_params) WHERE key = 'ga_session_id' LIMIT 1).int_value), 12)) AS session_count, FROM `table.events_*`
Active Users
Active users is an approximation. You may see differences across Google Analytics 4 surfaces, Read more: Active users in Different Reports in GA4 are Inconsistent
Calculation in BigQuery: To calculate Active Users count from BigQuery event export table, you first have to filter the events for Active Users only.
WITH ActiveUsers AS ( SELECT user_pseudo_id FROM `table.events_*` WHERE (SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'engagement_time_msec') > 0 OR (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'session_engaged') = '1' GROUP BY user_pseudo_id ) ) SELECT HLL_COUNT.EXTRACT(HLL_COUNT.INIT(user_pseudo_id, 14)) AS active_user_count, FROM ActiveUsers
Total Users
Total Users is also an estimate.
Calculation in BigQuery:
SELECT HLL_COUNT.EXTRACT(HLL_COUNT.INIT(user_pseudo_id, 14)) AS total_user_count, FROM `table.events_*`