Sub topic 12
Getting around the limits with the BigQuery export
Assume you know GA4 dimensions, metrics, events, users, and sessions. You should also be comfortable with basic SQL. This chapter focuses on the BigQuery export, which is useful when a GA4 report is sampled, thresholded, or grouped into an (other) row.
What the BigQuery export changes
The BigQuery export stores event-level records in your Google Cloud project. An event-level record describes one collected event, such as a page_view, purchase, or scroll. You can query these records yourself instead of asking GA4 to display a pre-aggregated report.
For many questions, this avoids three reporting limits:
- BigQuery queries are not subject to the sampling used by some Explorations.
- BigQuery queries are not subject to the privacy thresholds applied to reports.
- You choose the grouping, so GA4 does not need to merge excess dimension values into an
(other)row.
You still depend on the data that GA4 collected. Consent settings, blocked cookies, ad blockers, missing parameters, and implementation errors can make the export incomplete. The export does not recreate data that was never collected.
The export also does not contain every value that can appear in the GA4 interface. For example, some Google signals and modeled data are not available as ordinary event records. Therefore, a BigQuery total can differ from a GA4 report even when neither result is wrong.
Query event data directly
GA4 commonly creates daily tables named events_YYYYMMDD. The wildcard table name lets one query read a range of daily tables. _TABLE_SUFFIX limits the tables scanned, which reduces cost and improves performance.
The following query counts distinct users for each page and day. UNNEST(event_params) opens the repeated collection of event parameters so the query can find the page_location value.
SELECT
event_date,
(SELECT value.string_value
FROM UNNEST(event_params)
WHERE key = 'page_location') AS page_location,
COUNT(DISTINCT user_pseudo_id) AS users
FROM `my-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20260101' AND '20260131'
AND event_name = 'page_view'
GROUP BY event_date, page_location
ORDER BY users DESC;Replace the project and dataset with your own values. Use a date filter whenever possible. BigQuery charges for data processed, so querying several years of wildcard tables unnecessarily can be expensive.
user_pseudo_id is an identifier assigned to an app or browser instance. It is not automatically a known person. If your implementation sends a stable user_id, you can use that for signed-in users, but handle missing values carefully. A query using COUNT(DISTINCT user_id) alone can exclude anonymous events.
Important export limitations
| Question | BigQuery export behavior |
|---|---|
| Is the query sampled like an Exploration? | No report sampling, but the result is only as complete as the exported events. |
| Can a report threshold hide rows? | Report thresholds do not apply to the SQL result. |
| Can high cardinality create `(other)`? | Your query controls the grouping, so the GA4 report row is not created. |
| Does it include every GA4 interface metric? | No. Some modeled, Google signals, and attribution data may not be represented directly. |
The export has daily tables and, when enabled, streaming data. Streaming data can be incomplete or arrive later than the daily export. For finalized historical analysis, use the daily tables after allowing processing time.
Choose BigQuery deliberately
Use standard reports for quick totals and routine monitoring. Use Explorations when you need interactive analysis and the data volume remains manageable. Use the Data API when an application needs GA4 report metrics and dimensions. Use BigQuery when you need event-level detail, repeatable SQL, custom aggregation, or an audit of whether a report’s grouping changed the result.
A good workflow is to define the business question first, then reproduce its filters and metric definition in SQL. Do not compare a BigQuery count of collected events with a GA4 metric that uses a different counting method.
Exercise
Why might a BigQuery count of page views be lower than the page views shown in a GA4 report?
Show answer
The export may exclude events affected by consent or collection failures, while the report may include modeled or otherwise processed data. The two queries may also use different date ranges, filters, or metric definitions.