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_dateand the table name (events_YYYYMMDD) use the property’s reporting time zone.event_timestampis 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')
Consent-Denied Users
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:
- A
gclidis present:google / cpc. - Manual UTM values:
manual_sourceandmanual_medium. - A referrer (
page_referrer) from another site: that domain asreferral, ororganicif it’s a search engine. - 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
gclidis incollected_traffic_source.gclid, and in thepage_locationURL 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 thegclidto the Google Ads data transfer. - Without one of those, auto-tagged paid sessions show as
google / organicor 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_sourceisn’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.