Estimated Metrics in GA4: Sessions、Active Users and Total Users

Google Analytics BCS 4 days ago 61 Views 0 Comments

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 SessionsActive Users and Total Users.

The impact of Estimated Metrics

There are two main effects of Estimated Metrics:

 

Introduction to Estimated Metrics

The Estimated Metrics in GA4 include SessionsActive 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_*`

If you don't understand, You can leave a comment below.
Like (0)
Post my comment
Cancel comment
Expression Bold Strikethrough Center Italic

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website