GA4 BigQuery Export Discrepancies

Why the GA4 BigQuery export doesn't match GA4 reports, and how to rebuild session attribution in SQL.

  • GA4's BigQuery export is raw event data, so users, sessions and traffic sources won't match the GA4 interface without extra SQL work.
  • Event counts and revenue should match within a fraction of a percent; a bigger gap usually means a date range, time zone, filter or intraday-table problem.
  • A 2 to 5% gap in users and sessions is normal because GA4 uses estimates (and modeling) while BigQuery counts exact user_pseudo_id values.
  • There is no session row in the export: build sessions from user_pseudo_id plus ga_session_id, and note that events without a session ID are excluded.
  • Time zones matter: event_date and table names use the property's time zone, while event_timestamp is UTC. Use event_date or convert the timestamp to avoid events landing on the wrong day.
  • Consent-denied visitors are still exported but lack user_pseudo_id and ga_session_id, so they count toward events but not users or sessions. This is the biggest cause of large gaps on sites with lots of EU traffic.
  • Don't use traffic_source for session attribution (it's the user's first-ever source). Use session_traffic_source_last_click if available (mid-2024 onward); for older data, rebuild source from gclid, UTM values, referrer, then fall back to carried-forward or direct.
  • Older exports have no default channel group field, so you must write a CASE statement from source/medium; expect small differences for Paid Social, Paid Shopping and Video.
  • Google Ads campaign names for auto-tagged clicks aren't on the raw event; without the Ads link or a gclid join to the Ads data transfer, paid search sessions will appear low or misclassified as organic or direct.
  • Never union intraday and daily tables for the same date or you'll double count; standard properties have a 1 million events/day export limit, while streaming has no limit but is billed.

The GA4 BigQuery export is raw event data, so events, users, sessions and traffic sources won’t match the GA4 interface without extra work.

If you want numbers from the export that line up with GA4 reports, you have to know which differences are expected and which mean your SQL is wrong. Here’s each one I run into.

Why the Numbers Differ

Metric Why It Doesn’t Match
Events Should match closely. If not, check the date range, time zone and whether you included the intraday table.
Users GA4 estimates user counts and can add Google Signals and modeled users. BigQuery counts exact user_pseudo_id values.
Sessions There is no session row in the export. You build sessions from user_pseudo_id plus ga_session_id, and events without a session ID are left out.
Paid search sessions GA4 attributes Google Ads sessions using the linked Ads account. The raw export only has what was collected on the event.
Traffic source The traffic_source record is the user’s first source, not the session’s.

Is a 2 to 5% Gap Normal?

For users and sessions, yes. GA4’s interface uses estimates and the export is exact, so a gap of a few percent is expected and doesn’t mean anything is broken. For event counts and revenue, no. Those should be within a fraction of a percent, and a larger gap means a date, time zone or filter problem.

Time Zones

  • event_date and the table name (events_YYYYMMDD) use the property’s reporting time zone.
  • event_timestamp is UTC, in microseconds.

If you filter by table suffix and then group by a date built from event_timestamp, events near midnight land on the wrong day. Use event_date, or convert the timestamp to the property’s time zone:

DATE(TIMESTAMP_MICROS(event_timestamp), 'America/New_York')

With consent mode, events from visitors who decline analytics are still exported, but without the identifiers. In my exports they have no user_pseudo_id and no ga_session_id, and privacy_info.analytics_storage is No.

  • They count toward event totals.
  • They can’t be counted as users or sessions in SQL.
  • GA4 may model them in the interface, which BigQuery never does.

This is the biggest cause of a large gap on sites with a lot of EU traffic.

Session Source

There are three places a source can come from:

Field Scope
traffic_source The user’s first ever source. Using this for sessions is the most common mistake.
collected_traffic_source What was collected on that event: manual_source, manual_medium, gclid and others.
session_traffic_source_last_click Session source as GA4 attributes it, including Google Ads campaign data. Available in exports since mid 2024.

If your data has session_traffic_source_last_click, use it. It’s the closest match to the interface:

SELECT
  session_traffic_source_last_click.cross_channel_campaign.default_channel_group AS channel,
  COUNT(DISTINCT CONCAT(user_pseudo_id, '.', CAST(
    (SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY channel
ORDER BY sessions DESC

For older data, rebuild it. Take the first event in each session that has a source, in this priority order:

  1. A gclid is present: google / cpc.
  2. Manual UTM values: manual_source and manual_medium.
  3. A referrer (page_referrer) from another site: that domain as referral, or organic if it’s a search engine.
  4. None of the above: carry forward the user’s last known source within your lookback window, or (direct) / (none).

Default Channel Grouping

Older exports have no channel group field, so you write it as a CASE statement from source and medium using Google’s published rules. Check paid channels before organic, and expect small differences for Paid Social, Paid Shopping and Video, which depend on source lists Google maintains.

gclid & Google Ads Sessions

  • The gclid is in collected_traffic_source.gclid, and in the page_location URL on the landing event.
  • Campaign names for auto-tagged clicks aren’t on the raw event. They come from the Ads link, in session_traffic_source_last_click.google_ads_campaign, or from joining the gclid to the Google Ads data transfer.
  • Without one of those, auto-tagged paid sessions show as google / organic or direct in your SQL, and paid search sessions come out low.

Streaming Export

  • events_intraday_* tables fill during the day and are replaced by the daily table.
  • User attribution in traffic_source isn’t filled in for new users in intraday tables.
  • Don’t union intraday and daily tables for the same date, or you’ll double count.
  • Standard properties have a daily export limit of 1 million events. Streaming doesn’t have that limit, but it’s billed.

For ready to use queries, see Google Analytics queries for BigQuery, and for how GA4 assigns sources, Google Analytics attribution and traffic source.

Resume