Teams that move from Universal Analytics to GA4 with BigQuery as the data backbone almost always find that session counts in the GA4 interface differ from those calculated in BigQuery. The gap is sometimes small, but it undermines trust in both sources and triggers long reconciliation exercises.
The cause is that the two layers define sessions differently. The GA4 interface applies Google's own processing, which cannot be fully replicated: rules for when session_start fires, how session IDs persist and how late or out-of-order events are handled. The interface also estimates session counts with the HyperLogLog++ algorithm rather than counting them exactly. A BigQuery query that applies LAG() and a fixed timeout to event_timestamp will therefore not reproduce the interface figure. A common error is to assume that ga_session_id and ga_session_number behave identically in every implementation, particularly where tracking is customised.
The gap widens when part of the data comes from other collection methods. If a server-side or privacy-first tool such as Robin Signals sets session boundaries itself, or does not rely on client-side cookies for session IDs, a BigQuery model that ignores those differences will produce inconsistent counts. The session model must account for both GA4's default fields and any custom implementation.
The practical answer is to stop treating GA4's built-in session fields as the definition, and to stop trying to match the interface session for session. Define sessions in a dbt model such as stg_ga4__sessions that states the start criteria, the timeout and which event types count, built from event_timestamp and user_pseudo_id combined with ga_session_id. The definition is then transparent, testable and identical in every downstream report.
Accept a documented tolerance between the interface and the warehouse, and treat the dbt model as the reference for analysis. That ends recurring debates about which number is right and gives attribution, funnel and path analysis a stable base.
Viktor Kvant
Senior Web Analyst specialising in data ownership, advanced tracking implementations, and translating data into strategic business value.
Connect on LinkedIn