GA4 BigQuery export: the complete guide to raw event data
The Google Analytics 4 (GA4) BigQuery export writes each event as one row in your Google Cloud project. Nothing is sampled, thresholded, or folded into an "(other)" row. On Google's public sample, January 2021 holds 1,210,147 event rows. This guide covers what the export holds, how to enable it, count it, and model it.
| Question | Where the answer is |
|---|---|
| How do I enable the export, and what can't be changed later? | the settings to fix when you enable the export |
| What do the events, event_params, and items columns mean? | how events, event_params, and items fit together |
| How many sessions did I have? | three ways to count sessions, and which one to keep |
| Why doesn't my users count match GA4? | why the users count differs from the interface |
| Where did the "(other)" row in my report come from? | where the "(other)" row comes from |
| Why do my GA4 numbers change from one report to another? | sampling, thresholds, and cardinality explained |
| How much will the export cost us? | an estimation method for the export's cost |
| Which source and medium is the right one for my question? | which traffic-source field answers which question |
| Should we model the export with Dataform or dbt? | Dataform or dbt, and what incremental models change |
| Can I get my history back if I enable the export today? | why there is no backfill and what 14 months means |
What the export contains that the interface does not show
The GA4 BigQuery export holds every collected event, one row each, with no sampling, thresholds, or "(other)" row. The interface works from aggregated tables that Google computes and trims. The export is the material those tables were computed from. The difference is one of nature, not precision. The interface answers the questions Google planned for; the export answers yours.
The GA4 BigQuery export is a Google Analytics 4 feature that writes every collected event, as one row, into a BigQuery dataset of your own Google Cloud project, without sampling, thresholds, or an "(other)" row, once a day or in streaming.
Google's public sample gives a measure. January 2021 holds 1,210,147 event rows, sent by 94,790 pseudonymous users. No report in the interface shows a single event. Every report starts from this grain and aggregates upward.
Three mechanisms in the interface change the numbers you read, and none of them exists in the export. A fourth difference runs the other way. Some interface figures are modeled or borrowed, and they never reach BigQuery.
The three mechanisms of the interface: sampling, thresholds, cardinality
Sampling, data thresholds, and cardinality limits make an interface number differ from a raw count. Sampling applies to explorations beyond a quota of events: Google computes the result on a subset and extrapolates. Data thresholds withhold rows that could identify a person. Google names three triggers: demographic data, search queries, and low counts on a narrow date range. The rows are removed, not marked. Cardinality limits cap the rows a report table can hold, and surplus values collapse into one row. Each mechanism is documented, and each is silent in the report itself. All three disappear in the export. A count on the events table is a count, not an estimate. The mechanisms, their triggers, and their visible symptoms are detailed in Sampling, thresholding, and cardinality: three mechanisms that change your GA4 numbers.
The "(other)" row
The "(other)" row is the visible symptom of the cardinality limit. When a dimension has more values than a report table can store, the surplus is grouped under "(other)". Google treats any dimension with more than 500 values as high-cardinality, as guidance rather than a hard limit. The actual row limit depends on the report. Page paths, product names, campaign names, and landing pages are the usual victims. They change every day and run into thousands of values on a busy site. The row has no detail behind it. You cannot click it open, and the values it hides are not retrievable from the interface. The export has no such row. It stores page_location, item_name, and the campaign parameters as collected, on every event. What the row hides, and how to rebuild the report without it, are in The "(other)" row: what the GA4 interface stopped showing you.
What the export does not have either
The export does not contain modeled data, Google Signals data, or the credit assigned by Google's attribution models. Three families of interface figures therefore never appear in BigQuery. Behavioral modeling fills the gap left by refused consent, in the interface only. The export holds the consented events and nothing in their place. Google states that it does not export Google Signals data to BigQuery. Cross-device merging by the reporting identity also stays in the interface. The export keeps one user_pseudo_id per browser or device. Attribution is the third case. The export stores the traffic source of each event and session. It does not store the share of credit from the "data-driven" model. Reconciling the two systems is a method, not a search for the one true number. It is the subject of Modeled conversions and Google Signals: the data the export doesn't have.
Enabling the export: the settings you don't get to redo
Enabling the GA4 BigQuery export takes about ten minutes in the GA4 admin. Four settings decide what you will hold in a year. They are export frequency, dataset location, streams and events, and the link date. The link is a property setting, under Admin, then BigQuery links. It needs a Google Cloud project you own, with the BigQuery API enabled. Google then writes one table per day, named events_YYYYMMDD. The dataset is named analytics_ followed by the property identifier. Everything in this guide assumes that dataset exists. None of the four applies backward, and the location only changes through a relink or a dataset copy. Decide them before you click. The walkthrough, screen by screen, with the choices a European company should make, is in Enabling the GA4 BigQuery export: the settings that matter.
Daily or streaming
The daily export writes one finished table per day. The streaming export adds an intraday table rewritten during the day. Daily is the one your reporting should rely on. Its table events_YYYYMMDD usually lands in the early afternoon of the next day, in the property's time zone. Google then keeps adding late events to it for up to three days after that date. Streaming writes events_intraday_YYYYMMDD as events arrive. That table is deleted at the end of the day once the daily table is complete. Some records, such as traffic_source and is_active_user, are only populated in the daily table. The practical rule is to model the daily tables. Read the intraday table only for same-day monitoring that tolerates gaps. A standard property has a daily-export limit of one million events per day. A property that consistently exceeds it has its daily export paused. The streaming export then keeps the full volume.
Region and project
The dataset location is chosen when you create the link, and moving it later has a cost. Google documents two routes. One deletes the link, recreates the dataset elsewhere, and relinks, with a possible gap. The other replicates the dataset across regions, which keeps the link but adds a copy to manage. Google proposes a multi-region (United States or European Union) or a single region. For a European company, the European Union keeps the raw export inside the EU. That export holds pseudonymous identifiers and IP-derived geography. Every derived table lives in the same location, because BigQuery cannot join tables across locations. The project matters as much. The export lands in a project you own, under your billing and your IAM policies. Create a project for analytics, not inside an application project. Read roles on the export dataset then expose nothing else.
Streams and excluded events
A link covers the data streams you select and can exclude events by name. Both choices apply going forward, never retroactively. Web and app streams of the same property can share one link. Web and app events then sit in the same tables, with platform and stream_id to tell them apart. Excluding events is the usual way to stay under the daily limit. On content-heavy sites, scroll or user_engagement are common candidates. An excluded event is simply never written. If you need it next quarter, it will not exist for the past. The decision is per event name. Write it down next to your tagging plan, with the date. A gap in the table then has a known cause.
Why enable it before you need it: no backfill, 14 months
Google's export documentation describes no backfill. Events flow from the link onward, and nothing collected before it reaches BigQuery. Meanwhile, the GA4 interface keeps event-level data for explorations and funnel reports. A standard property keeps it 2 or 14 months, per the retention setting. Standard reports keep aggregates longer, but at the interface's grain. A company that links in October holds twelve months in BigQuery the following October. A company that waits until it has a question holds nothing. The only history you will own is the one you started collecting. Enable the export on every property, including those you do not analyze yet. The retention mechanics, and what the interface can still give you, are in GA4 data retention: 14 months, and no BigQuery backfill.
How do you read the schema by business question?
The export schema has one table per day and one row per event. A handful of nested columns hold most of the detail. Reading it by business question means knowing which column answers which question. It also means knowing which nested fields to unnest first. The flat columns give the context of the event. They include event_date, event_timestamp, event_name, user_pseudo_id, and user_id when you send one. Others are device, geo, platform, stream_id, and traffic_source. The nested columns are where the content is: event_params, user_properties, items, and ecommerce. A session, a landing page, a product, or a campaign is never a column. Each is a question you answer by combining these fields.
One row is one event
Every row in events_YYYYMMDD is one event. It is identified by its event_name, its event_timestamp in microseconds, and its user_pseudo_id. There is no row for a session, a user, or a pageview as such. A pageview is the row whose event_name is page_view. A session is the set of rows sharing a session identifier. A user is the set of rows sharing a user_pseudo_id. The grain explains the size. On the public sample, the 92 days from November 2020 to January 2021 hold 4,295,584 rows. That is 3.18 rows for every page_view event. The grain also explains the method. Any metric is an aggregation you specify, with its filters and its definition. Two analysts who do not share the definition will not share the number.
event_params, items, user_properties, and UNNEST
event_params, user_properties, and items are repeated records. Each row holds a list of key-value pairs, read with UNNEST or a subquery.
An event parameter is a key-value pair stored in the repeated event_params column of an export row, which describes that one event (its page, its session identifier, its engagement) and must be read with UNNEST or a subquery because it is not a column of its own. A value sits in one of four typed fields: string_value, int_value, float_value, or double_value. The right field depends on the key: ga_session_id is an integer, page_location a string. The query that follows lists the most frequent parameter keys in January 2021 on the public sample.
SELECT
ep.key AS param_key,
COUNT(*) AS occurrences
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`,
UNNEST(event_params) AS ep
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
GROUP BY param_key
ORDER BY occurrences DESC
LIMIT 8
| Parameter key | Occurrences, January 2021 |
|---|---|
page_location | 1,210,147 |
ga_session_id | 1,210,147 |
ga_session_number | 1,210,147 |
page_title | 1,202,594 |
engaged_session_event | 1,171,598 |
session_engaged | 1,113,643 |
debug_mode | 1,004,702 |
page_referrer | 964,706 |
Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).
Three keys appear on every one of the 1,210,147 rows: page_location, ga_session_id, and ga_session_number. That is what makes a session recoverable from events. For e-commerce events, items follows the same pattern, one record per product. Its fields include item_id, item_name, and quantity. A purchase of three products is one row with three items. The column-by-column reading, with the field to use for each common question, is in The GA4 export schema: events, event_params, and items explained.
The four traffic-source fields
The export carries four places where a traffic source is written, each at a different grain. Reading the wrong one is the most common cause of a channel report that contradicts GA4.
| Field | Grain | Question it answers |
|---|---|---|
traffic_source.source, .medium, .name | User, first touch | Where did this user come from the very first time? |
collected_traffic_source | Event, as collected | Which campaign parameters came in with this event? |
session_traffic_source_last_click | Session, last click | Which source gets the session in the acquisition reports? |
event_params keys source, medium, campaign | Event, on some events only | What did exports carry before the session-level record existed? |
The user-level traffic_source is the trap: it never changes after the first visit. A report built on it credits every purchase to the campaign that recruited the user, possibly months before. Session-level acquisition in the interface reads the session's last click. Recent exports store it in session_traffic_source_last_click. On the 2021 public sample that record does not exist yet, and neither does collected_traffic_source. The source sits only in event_params, on the events that carry it. The schema evolves, and a model written against an old export must be revisited. The decision table and a query that rebuilds the session source on older exports are in Traffic source in the GA4 export: four fields, one right answer per question.
Counting sessions, users, and transactions
Sessions, users, and transactions are the three numbers every stakeholder knows. None of the three is a column of the export. Each is a definition you write in SQL. You can approach the interface's definitions but not reproduce them. Consent, thresholds, and estimation sit between the two. The query below computes the three for January 2021 on the public sample. It adds the variants that explain the usual gaps.
SELECT
COUNT(*) AS event_rows,
COUNT(DISTINCT user_pseudo_id) AS users_by_pseudo_id,
COUNT(DISTINCT CONCAT(user_pseudo_id, '-', CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions_by_id,
COUNTIF(event_name = 'session_start') AS session_start_events,
COUNTIF(event_name = 'purchase') AS purchase_events,
COUNTIF(event_name = 'purchase' AND ecommerce.transaction_id = '(not set)') AS purchases_without_id,
COUNT(DISTINCT IF(event_name = 'purchase' AND ecommerce.transaction_id != '(not set)', ecommerce.transaction_id, NULL)) AS distinct_transaction_ids
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
| Measure | January 2021 |
|---|---|
| Event rows | 1,210,147 |
Users (distinct user_pseudo_id) | 94,790 |
Sessions (user_pseudo_id + ga_session_id) | 118,380 |
session_start events | 116,549 |
purchase events | 1,204 |
purchase events with transaction_id = (not set) | 300 |
Distinct transaction_id values, (not set) excluded | 894 |
Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).
One query shows two gaps at once. There are 118,380 sessions by identifier against 116,549 session_start events. And 1,204 purchase events hold 894 transactions. Each gap has a cause, and each cause is a decision to write down.
Three definitions of a session
A session in the export groups the events of one user that share one ga_session_id. Three ways of counting it give three numbers.
A GA4 session is a group of events from one user_pseudo_id that share one ga_session_id, closed after 30 minutes of inactivity by default. Counting distinct user_pseudo_id and ga_session_id pairs gives 118,380 sessions in January 2021 on the sample. This is the definition closest to the interface. Counting session_start events gives 116,549. On the sample, 1,866 January sessions have events but no session_start in the export. Only 3 of them started on December 31, in the previous daily table. The export does not say why the others lack one. Re-sessionizing from timestamps with a 30-minute gap gives a third number, stable across tools but foreign to GA4. The interface then applies its own adjustments. Even the first definition will not match it to the unit. The decision is to pick one definition, write it in one place, and reuse it in every table. The three queries, their results, and the rule for choosing are in Counting GA4 sessions in BigQuery without getting it wrong.
Why the users count never equals the interface
The interface estimates active users, filtered by activity and consent. The export lets you count distinct user_pseudo_id exactly. The two numbers describe different populations with different arithmetic. On the public sample, 94,790 distinct user_pseudo_id sent at least one event in January 2021. Active users are those with an engaged session, a first visit, or engagement time on a website. Their total for a period is an estimate, computed with HyperLogLog++ and a small documented error margin. Three further gaps: user_pseudo_id is a device-and-browser identifier, so one person on two devices is two users. Consent refusals remove rows from both systems, but modeled users are added back in the interface only. And data thresholds can hide small segments. The useful stance is to state which number a report shows and why. Keep one of each: an exact daily count for trends and an estimated distinct count for totals. The detail, with the queries, is in GA4 users: why BigQuery and the interface never show the same number.
Transactions and duplicates
A transaction in the export is a purchase event with a transaction_id. Counting events instead of identifiers overstates it. On the public sample, January 2021 holds 1,204 purchase events. Once (not set) is excluded, they carry 894 distinct transaction_id values. Two causes share the gap. First, 300 purchase events carry no transaction_id at all. Those events can neither be deduplicated nor matched to an order. Second, the 904 events with an identifier map to 894 values. So 10 events repeat an identifier already counted. The export does not record why. A confirmation page loaded twice is one cause to check. The interface deduplicates on transaction_id within its own rules. A SQL model has to do it explicitly, with COUNT(DISTINCT transaction_id) and a written decision on (not set). Revenue follows the same logic: sum ecommerce.purchase_revenue once per transaction, not once per event. Call it revenue as GA4 measures it, because refunds, cancellations, and untagged orders are not in the export.
What the export costs, and how to estimate it
The export itself carries no Google Analytics fee on a standard property. You pay BigQuery, which bills stored bytes and the bytes each query reads. Both come with a monthly free allowance. Storage is billed per byte per month. A table untouched for 90 days moves to a cheaper long-term tier. On-demand queries are billed per byte read. BigQuery reads only the columns a query names. That is why SELECT * on an events table is the most expensive habit there is. The number to estimate is therefore rows per day, and the public sample gives the method.
SELECT
COUNT(DISTINCT event_date) AS days,
COUNT(*) AS event_rows,
ROUND(COUNT(*) / COUNT(DISTINCT event_date)) AS event_rows_per_day,
COUNTIF(event_name = 'page_view') AS page_views,
ROUND(COUNT(*) / COUNTIF(event_name = 'page_view'), 2) AS rows_per_page_view
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20201101' AND '20210131'
| Measure | 2020-11-01 to 2021-01-31 |
|---|---|
| Days | 92 |
| Event rows | 4,295,584 |
| Event rows per day (rounded to the unit) | 46,691 |
page_view events | 1,350,428 |
Event rows per page_view (rounded to two decimals) | 3.18 |
Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).
The ratio of 3.18 rows per pageview is the bridge. Take a month of pageviews from the GA4 interface. Multiply them by the ratio of your own tagging. Enhanced measurement and e-commerce raise that ratio. The result is rows per day. Rows times an average row size give stored bytes. Multiply stored bytes by the share of columns your models read, then by daily runs. That gives query bytes. As a reference point, the January 2021 counting query in this guide read 269,916,729 bytes for one month. It touched event_params on every row. Google's rate card and free allowance then turn bytes into an amount. This guide leaves that step to you. The method, the row-size measurement, and the habits that keep query bytes low are in What the GA4 BigQuery export costs: an estimation method without surprises.
How do you get from the events table to the tables that serve?
The events table is the material, not the report. Between the two sit three layers of tables that a pipeline rebuilds every day, each with one job. A report that queries events_* directly recomputes the session on every click. It also pays the full scan every time. And it lets every analyst write a slightly different session. The layering is not bureaucracy. It is the only way to hold one session definition shared by every page, filter, and analyst. The layers also give the pipeline its checkpoints. A defect in a mart traces back to its intermediate table. From there it leads to the staging row, then to the raw event.
Staging, intermediate, and marts
Three layers, three grains, three audiences: staging flattens, intermediate defines, marts aggregate.
| Layer | Grain | What it does | Who reads it |
|---|---|---|---|
| Staging | One row per event | Flattens the main parameters into typed columns, builds the session key, converts timestamps to the property's time zone | The intermediate layer only |
| Intermediate | One row per session, user-day, or transaction | Applies the definitions decided once: session, user, transaction, source of the session | Analysts, and the marts |
| Marts | One row per day and combination of dimensions | Aggregates what reports filter on; small enough for Power BI Import mode | Power BI, the business |
A question no mart answers goes back to the intermediate layer. It never goes to raw events inside a report. Only the staging layer reads events_*. The full scan is then paid once per day, not once per report. The intermediate layer holds the counting decisions of this guide. They are the session key, the user identifier, transaction deduplication, and the traffic-source field per question. Each layer is a folder of SQL files under version control. Each file states its grain in its first line. The grain is the first thing a reader needs.
Dataform or dbt
Dataform and dbt both turn a folder of SQL files into a tested dependency graph, run in order. Either one is a sound choice. The decision turns on where it runs and who maintains it. Dataform is a Google Cloud service. It runs inside BigQuery under a service account, needs no server, and writes assertions as BigQuery queries. The dbt tool is a separate program. It compiles SQL and sends it to BigQuery from wherever you host it. For a GA4 export, the deciding question is incremental processing. Both tools support it. But daily tables that Google updates for three days impose a pattern to write explicitly in either. A team already on dbt for other sources should stay on dbt. A team starting from a Google Cloud project alone is served by Dataform, with no server to run. The comparison, with the incremental pattern written in both dialects, is in Dataform or dbt for the GA4 export: what incremental models change.
How do you keep the tables right every day?
A pipeline on the GA4 export is correct the day it is written. A week later it is wrong, unless two things are in place. The first is an incremental load that reprocesses the days Google can still update. The second is a set of assertions that stop the run when a table looks wrong. Rebuilding the full history every day is the simple option, and on a small site it works. On a site with millions of rows a day, it multiplies query bytes by the history length. The alternative, incremental processing, reads only new days, and that is exactly where late-arriving events break it.
Incremental loads and late-arriving events
A late-arriving event is an event that Google receives after the daily table of its date was first written and adds to that table afterwards, which can happen for up to three days after the event date. An incremental model that processes events_YYYYMMDD once, the day it appears, misses those additions. The pattern that works reprocesses a sliding window: every run deletes and rebuilds the last three days in every derived table, then appends the result. The window should be measured on your property, not assumed. Compare the row count of a daily table on its first day and four days later, over a few weeks. Two more sources of lateness exist. App events sent from devices that were offline can carry an event timestamp days older than the table. And the intraday table must never be merged into history.
Assertions and daily checks
An assertion is a query that must return zero rows, run after each table, and that fails the pipeline when it does not. Five assertions catch most of what goes wrong on a GA4 export. Uniqueness of the key, so that the sessions table has one row per session. Non-null session identifiers after staging. Row counts close to the same weekday a week before, to catch a tagging break or missed day. A table for yesterday present, which catches a paused export. And a reconciliation of mart totals against the intermediate layer, which catches a join that duplicated rows. Each assertion is cheap, because it reads one table. The check that matters most is the simplest. Did the day's table arrive, with about as many rows as usual?
FAQ
Is the GA4 BigQuery export free?
Google Analytics charges nothing for the link or the export on a standard property. BigQuery bills what you store and what your queries read, after a monthly free allowance for each. A sandbox project without billing can even receive the export within its limits. For a mid-size site, storage is the small line. Query bytes are what grow when models are written carelessly. Estimate rows per day first, then bytes.
Does the export recover my history?
No, the export does not recover your history. Google's export documentation describes no backfill. The export writes from the link onward, and nothing collected before it reaches BigQuery. The GA4 interface keeps its event-level data for 2 or 14 months, at its own grain. It does not let you export it as events. The only history you will have is the one you start collecting today, on every property you link.
Why don't my BigQuery sessions match GA4?
Because a session is a definition, and the interface's definition includes steps you cannot reproduce. BigQuery counts the distinct user_pseudo_id and ga_session_id pairs you hold. The interface estimates the number of unique session IDs with HyperLogLog++, then applies consent modeling and thresholds. On the public sample, 118,380 sessions by identifier against 116,549 session_start events already show how two definitions diverge.
How long does the export keep the data?
As long as you keep it. The exported tables have no retention imposed by Google Analytics. They stay until you delete them or until a default table expiration set on the dataset removes them. Check that setting on the export dataset once, because an expiration configured by mistake deletes history silently. The 2- or 14-month retention of GA4 applies to the interface, not to BigQuery.
What is the difference between the daily and the streaming export?
The daily export writes one complete table per day, events_YYYYMMDD, usually by the next early afternoon. Google keeps adding late events to it for up to three days. The streaming export writes events_intraday_YYYYMMDD as events arrive. That table is a working copy, with records such as traffic_source left empty. Google deletes it once the daily table is complete. Model the daily tables. Use the intraday table for same-day monitoring only.
Do I need GA4 360 for the export?
No, the export does not require GA4 360: it is available on standard properties. The difference is volume. A standard property has a daily-export limit of one million events per day. A property that consistently exceeds it has its daily export paused. The streaming export has no such limit. GA4 360 raises the limit and adds longer retention options. A standard property with a few hundred thousand events a day exports everything.
Does the export respect consent?
The export contains what GA4 collected, so events blocked by a consent banner are absent. The consent state of each collected event arrives in the privacy_info record when consent mode is enabled. What the interface fills in with behavioral modeling is not exported. Whether your setup meets your obligations is a question for your DPO and the applicable texts. The export schema does not answer it.
Every number in this guide came from a query on the public sample. The ten articles of this guide run the full method, one question at a time. Want new analyses like this one as they ship? Get new analyses as they ship.
Sources
- BigQuery export schema for Google Analytics 4 (opens in a new tab) - Google, consulted 2026-10-15
- Set up BigQuery Export (opens in a new tab) - Google, consulted 2026-10-15
- Data retention in Google Analytics 4 (opens in a new tab) - Google, consulted 2026-10-15
- About the "(other)" row and high-cardinality dimensions (opens in a new tab) - Google, consulted 2026-10-15
- About Analytics sessions (opens in a new tab) - Google, consulted 2026-10-15
- About data thresholds (opens in a new tab) - Google, consulted 2026-10-15