The GA4 BigQuery export schema is one table per day, events_YYYYMMDD, and every row in it is a single event. Simple values like event_name sit in plain columns. Parameters, user properties and products live in nested, repeated records that you have to UNNEST before you can read them. Below is every field Google documents, in Google’s own groups, with its type and what it actually tells you.
You’ll find the same structure in your own project at BigQuery › Explorer › your project › Datasets › analytics_<property_id> › events_YYYYMMDD › Schema. That tab gives you names and types. It won’t tell you which fields stay empty, which three of them all claim to be “the source”, or why your totals don’t match the GA4 interface. That’s the part this page covers.
How the Tables and Rows Are Organized
Every linked property gets a single dataset called analytics_<property_id>. Inside it, Google writes up to two kinds of daily tables, depending on which export options are switched on for the link.
| Table | When it exists | What to know |
|---|---|---|
events_YYYYMMDD | Daily export is on | The full day. Late events keep arriving for a while, so the table for January 1 can still change on January 4. |
events_intraday_YYYYMMDD | Streaming export is on | Filled continuously during the day and deleted once the daily table is complete. The BigQuery sandbox doesn’t get it at all. |
Report from the daily tables. Google recommends events_YYYYMMDD over the intraday table because it’s a stable dataset for the day, while streaming is a best-effort service that can have gaps. Keep intraday for checking that today’s tags fire.
Inside a table, one event is one row, but the row isn’t flat. A single page_view carries page_location, page_title and page_referrer as separate entries in the repeated event_params record. In the preview it looks like one event spread over several lines, with the name and timestamp on the first line and each parameter on its own line underneath.
The Schema, Group by Group
Google’s schema reference splits the columns into 11 groups. I’ve kept that order, cut the descriptions down to what you need while writing SQL, and noted the fields that cause trouble. Types are exactly as Google lists them, including a couple that look wrong at first glance.
Event fields
| Field | Type | What it tells you |
|---|---|---|
event_date | STRING | The event date as YYYYMMDD, in your property’s time zone. |
event_timestamp | INTEGER | When Google Analytics received the event, in microseconds, UTC. Events sent in one request can share it. |
event_previous_timestamp | INTEGER | When the previous event happened, in microseconds, UTC. |
event_name | STRING | The event name, such as page_view or purchase. |
event_value_in_usd | FLOAT | The event’s value parameter, converted to USD. |
event_bundle_sequence_id | INTEGER | Sequential ID of the bundle the event was uploaded in. |
event_server_timestamp_offset | INTEGER | Gap between collection time and upload time, in microseconds. |
batch_page_id | INTEGER | Goes up with each new page within an engagement. |
batch_ordering_id | INTEGER | Goes up every time a page sends a network request. |
batch_event_index | INTEGER | The event’s position inside its batch, in the order it happened on the device. |
event_params is a RECORD that repeats once per parameter. Which keys you get depends on your tagging, so the list is different for every property. The shape of the record never changes, though, and the typed value columns are where most first queries go wrong.
| Field | Type | What it tells you |
|---|---|---|
event_params.key | STRING | The parameter name, such as page_location or ga_session_id. |
event_params.value | RECORD | Holds the value in one of the four typed fields below. |
value.string_value | STRING | Text values like URLs and campaign names. |
value.int_value | INTEGER | Whole numbers. Google’s own session queries read ga_session_id from here. |
value.double_value | FLOAT | Decimal numbers. |
value.float_value | FLOAT | Documented, but Google says it isn’t currently in use. |
User fields
The privacy_info fields are filled from the visitor’s consent state when consent mode is on. If you haven’t set it up yet, start with the guide to Google Consent Mode v2 and its four signals, because the first two columns mirror the consent signals your banner sends.
| Field | Type | What it tells you |
|---|---|---|
user_id | STRING | The unique ID assigned to a user, if you send one. |
user_pseudo_id | STRING | Pseudonymous ID given on the first visit or app open. Count this when you don’t send user_id. |
user_first_touch_timestamp | INTEGER | When the user first visited or opened the app, in microseconds. |
is_active_user | BOOLEAN | Whether the user was active at any point that calendar day. Daily tables only. |
privacy_info.analytics_storage | STRING | Analytics storage consent: Yes, No or Unset. |
privacy_info.ads_storage | STRING | Whether ad targeting is enabled: Yes, No or Unset. |
privacy_info.uses_transient_token | STRING | Yes when a web user denied analytics storage and measurement without cookies, based on transient tokens in server data, is enabled. |
user_properties.key | STRING | The name of a user property you set. The record repeats once per property. |
user_properties.value.string_value, .int_value, .double_value | STRING, INTEGER, FLOAT | The property’s value, in whichever column matches its type. |
user_properties.value.float_value | FLOAT | Documented as currently unused. |
user_properties.value.set_timestamp_micros | INTEGER | When the property was last set, in microseconds. |
user_ltv.revenue | FLOAT | The user’s lifetime revenue. Empty in intraday tables. |
user_ltv.currency | STRING | The currency of that lifetime value. Empty in intraday tables. |
Device and geo
| Field | Type | What it tells you |
|---|---|---|
device.category | STRING | Mobile, tablet or desktop. |
device.mobile_brand_name, .mobile_model_name, .mobile_marketing_name | STRING | The device’s brand, model and marketing name. |
device.mobile_os_hardware_model | STRING | The model as reported by the operating system itself. |
device.operating_system, .operating_system_version | STRING | The OS and its version. |
device.vendor_id | STRING | IDFV, present only when IDFA isn’t collected. |
device.advertising_id | STRING | Advertising ID or IDFA. |
device.language | STRING | The OS language. |
device.time_zone_offset_seconds | INTEGER | Offset from GMT, in seconds. |
device.is_limited_ad_tracking | BOOLEAN | The device’s Limit Ad Tracking setting. |
device.web_info.browser, .browser_version | STRING | The browser and its version. |
device.web_info.hostname | STRING | The hostname the event was logged on. Handy for keeping staging sites out of your numbers. |
geo.continent, .sub_continent, .country, .region, .metro, .city | STRING | Location, worked out from the IP address. |
Traffic source records
There are three of them, and they don’t answer the same question. The section after the reference explains which one to use. Here’s what each record holds. Every field in all three is a STRING.
Field in collected_traffic_source | Type | What it tells you |
|---|---|---|
manual_source, manual_medium | STRING | utm_source and utm_medium collected with the event, plus values parsed from referral parameters. |
manual_campaign_name, manual_campaign_id | STRING | utm_campaign and utm_id. |
manual_term, manual_content | STRING | utm_term and utm_content. |
manual_source_platform, manual_creative_format, manual_marketing_tactic | STRING | The matching utm_source_platform, utm_creative_format and utm_marketing_tactic tags. |
gclid | STRING | The Google Ads click ID that came with the event. |
dclid | STRING | The click ID for Display & Video 360 and Campaign Manager 360. |
srsltid | STRING | The Google Merchant Center identifier. |
Part of session_traffic_source_last_click | Fields | What it tells you |
|---|---|---|
manual_campaign | 9 | source, medium, campaign_name, campaign_id, term, content, source_platform, creative_format, marketing_tactic of the last clicked manual campaign. |
google_ads_campaign | 6 | customer_id, account_name, campaign_id, campaign_name, ad_group_id, ad_group_name. |
cross_channel_campaign | 5 | campaign_id, campaign_name, source, medium, source_platform of the last clicked cross-channel campaign. |
sa360_campaign | 10 | Search Ads 360 campaign, ad group and account details. |
dv360_campaign | 18 | Display & Video 360 partner, advertiser, campaign, creative, exchange, insertion order and line item details. |
cm360_campaign | 20 | Campaign Manager 360 account, advertiser, campaign, creative, placement and site details. |
Field in traffic_source | Type | What it tells you |
|---|---|---|
traffic_source.source | STRING | The network that first acquired the user. Same as the User source dimension in reports. |
traffic_source.medium | STRING | The medium that first acquired the user. Same as User medium. |
traffic_source.name | STRING | The campaign that first acquired the user. Same as User campaign. |
Stream and platform
Two plain columns. stream_id is the numeric ID of the data stream, stored as a STRING, so compare it to '1234567890' in quotes. platform is a STRING that tells you whether the event came from Web, IOS or Android.
Ecommerce
The ecommerce record holds order-level values. If your purchase tracking isn’t in place yet, the walkthrough on e-commerce tracking without a developer covers the events that fill it.
| Field | Type | What it tells you |
|---|---|---|
ecommerce.transaction_id | STRING | The transaction ID of the order. |
ecommerce.purchase_revenue, _in_usd | FLOAT | Revenue in local currency and in USD. Filled on purchase events only. |
ecommerce.refund_value, _in_usd | FLOAT | Refund amount. Filled on refund events only. |
ecommerce.shipping_value, _in_usd | FLOAT | Shipping cost. |
ecommerce.tax_value, _in_usd | FLOAT | Tax. |
ecommerce.total_item_quantity | INTEGER | The sum of items.quantity in the event. |
ecommerce.unique_items | INTEGER | Unique items, judged by item_id, item_name and item_brand. |
Items
items repeats once per product in the event. Predefined fields like item_id get columns of their own. Only the custom item parameters you define end up in items.item_params, which has the same key and typed value shape as event_params.
| Field | Type | What it tells you |
|---|---|---|
items.item_id, .item_name, .item_brand, .item_variant | STRING | Who the product is. |
items.item_category to .item_category5 | STRING | The category and four sub-category levels. |
items.price, .price_in_usd | FLOAT | Price in local currency and in USD. |
items.quantity | INTEGER | Quantity. Set to 1 if you don’t send it. |
items.item_revenue, .item_revenue_in_usd | FLOAT | Price times quantity. Filled on purchase events only. |
items.item_refund, .item_refund_in_usd | FLOAT | Price times quantity. Filled on refund events only. |
items.coupon, .affiliation, .location_id | STRING | Coupon code, supplying company or store, and the item’s location. |
items.item_list_id, .item_list_name | STRING | The list the product was shown in. |
items.item_list_index | STRING | The product’s position in that list. Yes, a STRING, so cast it before sorting. |
items.promotion_id, .promotion_name, .creative_name, .creative_slot | STRING | The promotion and the creative slot the product appeared in. |
items.item_params.key, .value.string_value, .int_value, .double_value, .float_value | STRING, STRING, INTEGER, FLOAT, FLOAT | Your custom item parameters. |
App-only groups
app_info holds four STRING fields: the app’s package or bundle ID, its Firebase App ID, the store that installed it, and its version. publisher holds AdMob ad data: estimated ad revenue in USD on ad impression events, plus ad format, ad source and ad unit. It’s never filled in intraday tables. On a website-only property you can skip both groups.
Same Visit, Different Answers: Picking the Right Source Record
This is where most BigQuery traffic reports go wrong. All three records look like “source and medium”, and people grab whichever one autocompletes first. Here’s one visit, read through each of them.
A reader first found you through your newsletter in March, from a link tagged
utm_source=newsletter&utm_medium=email. Today she clicks a LinkedIn post taggedutm_source=linkedin&utm_medium=social, lands on a blog post, then reads two more pages.
| Record | Scope | What it shows for today’s three page views |
|---|---|---|
traffic_source | User, first acquisition | newsletter / email, today and on every later visit. It doesn’t change when she clicks other campaigns. |
collected_traffic_source | The event itself | linkedin / social on the landing page view, because that hit carried the tags. The two later page views carried no campaign data of their own. |
session_traffic_source_last_click | The session | linkedin / social, the last-click source attributed to the session. |
So match the record to the question. “What brought this person to us the first time” is traffic_source. “How many sessions came from LinkedIn” is session_traffic_source_last_click. “What exactly was on this hit” is collected_traffic_source. If the First user versus Session split still feels slippery in the interface, the guide to how GA4 channel groupings classify traffic walks through the same logic in reports.
One more trick from Google’s own help. When traffic_source shows a “Not Available” record for an ad click, pull the gclid from collected_traffic_source and look the click up through the Google Ads API, Google Ads Scripts or the BigQuery Data Transfer Service for Google Ads. wBRAID and gBRAID identifiers aren’t in the export, so those clicks can’t be recovered this way.
Three Queries You Can Copy
Each one filters dates with _TABLE_SUFFIX, the way Google’s own examples do, so you only scan the days you ask for. Swap in your project and property ID. A bonus of filtering on digits is that intraday tables drop out on their own, because their suffix starts with intraday_.
1. Sessions by source and medium
SELECT
session_traffic_source_last_click.manual_campaign.source AS source,
session_traffic_source_last_click.manual_campaign.medium AS medium,
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 `your-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY source, medium
ORDER BY sessions DESCA session here is user_pseudo_id plus ga_session_id, the same pair Google’s own session queries group by. Clicks from Google’s ad products have their own parts of the record, like google_ads_campaign, so add those columns if you run ads.
2. Which parameters each event carries, and in which column
SELECT
event_name,
ep.key AS param,
COUNTIF(ep.value.string_value IS NOT NULL) AS string_rows,
COUNTIF(ep.value.int_value IS NOT NULL) AS int_rows,
COUNTIF(ep.value.double_value IS NOT NULL) AS double_rows
FROM `your-project.analytics_123456789.events_*`,
UNNEST(event_params) AS ep
WHERE _TABLE_SUFFIX BETWEEN '20261025' AND '20261031'
GROUP BY event_name, param
ORDER BY event_name, paramRun this before any real query. It tells you whether a parameter lives in string_value or int_value, which saves you from the classic “my column is all NULL” moment. If a numeric parameter like value shows up in more than one column, wrap the typed fields in COALESCE, as Google’s revenue examples do.
3. Orders, revenue and products
-- Order level: one row per purchase event
SELECT
event_date,
COUNT(DISTINCT ecommerce.transaction_id) AS orders,
SUM(ecommerce.purchase_revenue) AS revenue,
SUM(ecommerce.total_item_quantity) AS units
FROM `your-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
AND event_name = 'purchase'
GROUP BY event_date
ORDER BY event_date-- Product level: one row per item in each purchase
SELECT
item.item_name,
SUM(item.quantity) AS units,
SUM(item.item_revenue) AS item_revenue
FROM `your-project.analytics_123456789.events_*`,
UNNEST(items) AS item
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
AND event_name = 'purchase'
GROUP BY item.item_name
ORDER BY item_revenue DESCKeep these two apart. Once you UNNEST(items), every order-level value repeats on each product row, so SUM(ecommerce.purchase_revenue) in the second query would count a three-product order three times.
Why BigQuery Won’t Match Your GA4 Reports
You’ll compare totals at some point, and they won’t line up. Most of the gap comes from a handful of documented differences in how the export works.
- No modeling. Google says the export leaves out the “value additions” it makes in standard reports and explorations, and the daily export is last click observed, with no modeling.
- Two clocks.
event_datefollows your property’s time zone, whileevent_timestampis UTC. Group by one or the other, never a mix. - Late events. Daily tables keep taking late events for up to three days, so yesterday’s number isn’t final yet.
- Intraday holes.
traffic_source,user_ltv,is_active_userandpublisheraren’t filled in intraday tables. Streaming also skips first-user source for new users, and for existing users it needs about 24 hours. - Cookieless pings. With consent mode on, cookieless pings land in the export too, so check
privacy_infobefore you count users. - The dead column.
float_valueisn’t in use. Readint_valueordouble_valueinstead.
Want to practice before touching your own data? Google publishes an obfuscated sample, bigquery-public-data.ga4_obfuscated_sample_ecommerce, with Google Merchandise Store events from November 1, 2020 to January 31, 2021. Two catches: it has no batch_ fields, and some values are placeholders like <Other>, NULL or an empty string.
Once your queries return numbers you trust, the next job is shaping them into something people act on. The guide on turning analytics data into decisions picks up from there.
Frequently Asked Questions
What tables does the GA4 BigQuery export create?
One dataset per property, named analytics_<property_id>. With daily export on, you get an events_YYYYMMDD table per day. With streaming on, you also get events_intraday_YYYYMMDD, which is deleted once that day’s daily table is complete.
What’s the difference between traffic_source and collected_traffic_source?
traffic_source is the source, medium and campaign that first acquired the user, and it never changes after that. collected_traffic_source is whatever campaign data arrived with the individual event, such as UTM tags or a gclid. For session-level reporting, use session_traffic_source_last_click.
Why is traffic_source empty in my intraday table?
Because Google doesn’t fill it there. The traffic_source record isn’t populated in intraday tables, and streaming export skips first-user source for new users. Query the daily events_YYYYMMDD table for user acquisition.
What are batch_event_index, batch_ordering_id and batch_page_id for?
They put events in the order they happened, even when several were sent in one batch. Google’s own page-sequence query sorts by user_pseudo_id, user_id, batch_page_id, batch_ordering_id and then batch_event_index.

