ETLMCPData Conveyance Works
Log in Start free
Guides

GA4 users and sessions, and why users don't sum

How GA4 defines a session and counts users, why adding up daily or per-campaign user rows overcounts people, and what to total instead.

Coming This connector is coming.

A GA4 session is a stretch of activity that ends after 30 minutes without interaction, unless you change that timeout. A user count is a count of distinct people, so the same person shows up in every daily row and every campaign row they touched. That is why the users in seven daily rows add up to more than the users GA4 reports for the whole week, while sessions can be added up. Both figures are estimates: GA4 counts them with the HyperLogLog++ algorithm, not with an exact tally. When the GA4 connector is available, etlmcp stores users per day, campaign and source / medium, marks them as not additive, and its group rule never sums them.

How GA4 defines a session

  • A session begins when someone opens your app in the foreground, or views a page or screen while no session is open, for example because the last one timed out.
  • The default timeout is 30 minutes of inactivity. On a website you can set your own value, in hours and minutes, in the data stream's tag settings under "Adjust session timeout". In an app the clock starts when the app goes to the background, and the Firebase SDK lets you change the default.
  • There is no upper limit on how long one session can run.

The Data API counts sessions as the sessions that began, through the session_start event, and engagedSessions as the sessions that lasted more than 10 seconds, had a key event or had two or more screen views.

How GA4 counts users

The API reference defines totalUsers as the distinct users who logged at least one event, and newUsers as users whose first visit or first app open fell in the period. Google's help page on user metrics adds that new users and active users won't exceed total users, though data thresholds can still make the figures disagree, and that a returning visitor who leaves within 10 seconds without engaging counts in total users but not in active users. How GA4 decides that two visits belong to one person depends on the property's reporting identity; see GA4 reporting identity.

Every figure is an estimate

GA4 estimates distinct counts with HyperLogLog++ (HLL++) instead of counting every identifier. Google's developer blog lists sessions, active users and total users among the metrics estimated this way, at a precision of 12 for sessions and 14 for both user metrics; a higher precision means a smaller error. The same blog says Data API counts are approximations too, so the numbers etlmcp reads are estimates. The BigQuery export holds event-level data, where you can count exactly; the GA4 API and BigQuery comparison covers that.

Why adding up users overcounts

A distinct count belongs to the exact set of days and dimension values it was asked for.

  • Across days. Someone visits on Monday and again on Thursday. The Monday row counts them, the Thursday row counts them, and the weekly report counts them once. Add the seven daily rows and that person is in your total twice.
  • Across campaigns or channels. Someone arrives through a newsletter link in the morning and a paid search ad in the afternoon. Each session carries its own campaign and source / medium, so the person appears on both rows for that day, but only once in the day's total.

The sum of the rows is an upper bound on the true number of people, and the largest single row is a lower bound. Neither is GA4's figure for the combined period.

Sessions behave differently. The API counts a session through its session_start event, and each session has one session campaign and one source / medium, so the sessions on separate campaign rows are separate sessions, and adding them comes close to the period's total. The total can still differ slightly from GA4's figure for the period, because every row is an estimate.

Ratios inherit the problem. Summed sessions divided by summed users gives a sessions-per-user figure that is too low, and any rate with users underneath it, such as revenue per user, is distorted in the same way.

What etlmcp does with the two counts

When the GA4 connector is available, each sync stores one row per day, session campaign and session source / medium for each property, with sessions, engaged_sessions, total_users and new_users among the extra fields. The GA4 sync page lists every field and the GA4 connector page the rest of the reference.

  • The user counts are flagged. The connector marks total_users and new_users as not additive, their descriptions tell you not to add them up, and the field catalogue labels their source "(not additive)". Sessions and engaged sessions carry no such flag.
  • The group rule leaves them out. A group rule adds up the platform's numeric extras within each group, but it skips total_users and new_users, along with reach from other platforms. The grouped rows have no user columns, whichever aggregation you pick. sessions and engaged_sessions are combined like any other extra.
  • Merged rows have no users. When the connector merges two rows for one campaign returned under two names, it sums the sessions and leaves both user counts empty, because one person may sit in both rows. See renamed campaigns.

What to do instead

  • Total sessions and engaged_sessions freely across days, campaigns and sources.
  • Read total_users and new_users only at the grain etlmcp stores them: one day, one campaign, one source / medium.
  • When you need the people behind a week, a month or a whole channel, take that figure from GA4 for exactly that range and those filters, in the GA4 interface or with your own Data API request. It cannot be rebuilt from daily rows.
  • In your own SQL over etlmcp's table, do not SUM the user columns. If you must, label the result user-days, so nobody reads it as people.
  • Prefer session-based ratios, such as revenue per session or key events per session, when you roll data up.

For which campaign a session or a user is credited to, see session, event and user scope.

Related

Sources

  1. About Analytics sessions — support.google.com, checked
  2. API dimensions and metrics — developers.google.com, checked
  3. [GA4] Understand user metrics — support.google.com, checked
  4. Unique count approximation in Google Analytics — developers.google.com, checked
  5. Reporting data expectations — developers.google.com, checked