GA4 BigQuery Export Setup

GA4 BigQuery export is the single most underused GA4 feature. Setup, the event schema, the queries that unlock cohort retention, LTV modeling, and custom attribution.

By David Schaefer · LinkedIn · Updated May 2026

Why BigQuery export matters

GA4 reports lag by 24 to 48 hours, apply privacy thresholding that hides small segments, and limit you to the dimension and metric combinations Google ships. BigQuery export gives you raw event data streamed daily (or near-real-time on 360) with no thresholding, no sampling, and full access to every parameter you pass. Once you have it, you can build cohort retention, custom attribution, LTV models, and joins with your backend customer data — none of which are possible inside the GA4 UI.

Setting it up

  1. Create a Google Cloud project (or use an existing one) and enable the BigQuery API.
  2. In GA4, go to Admin → Product Links → BigQuery Linking → New Link.
  3. Choose your Cloud project, frequency (daily and/or streaming), and dataset location.
  4. Confirm. Within 24 hours, a dataset named analytics_<property_id> appears in BigQuery with tables named events_YYYYMMDD.
  5. Verify the export is running. Run a basic query: SELECT COUNT(*) FROM \`project.dataset.events_*\` WHERE _TABLE_SUFFIX = '20260512'. The count should match your GA4 event count for that day, approximately.

The schema in short

Each row is one event. Key columns: event_date, event_timestamp, event_name, event_params (array of name-value pairs), user_pseudo_id, user_id, device, geo, traffic_source, ecommerce (struct), items (array of structs). Parameter values are nested inside event_params; you UNNEST them to extract specific parameters.

Cost

BigQuery free tier covers 10 GB of storage and 1 TB of query processing per month. Most GA4 accounts under 10 million events per month fit in the free tier. Beyond that:

  • Storage: roughly $0.02 per GB per month (active storage).
  • Query: $5 per TB scanned (or use BigQuery Editions for flat pricing).

A small to mid-size DTC brand typically pays $20 to $200 per month for GA4 BigQuery storage and queries.

The queries that earn the export back

90-day repeat purchase rate

WITH first_purchase AS ( SELECT user_pseudo_id, MIN(event_timestamp) AS first_ts FROM \`project.dataset.events_*\` WHERE event_name = 'purchase' GROUP BY 1
)
SELECT DATE(TIMESTAMP_MICROS(first_ts)) AS cohort_date, COUNT(DISTINCT user_pseudo_id) AS new_buyers, COUNT(DISTINCT IF(later.event_timestamp BETWEEN first_ts + 1 AND first_ts + 90 * 24 * 3600 * 1000000, user_pseudo_id, NULL)) AS repeat_buyers
FROM first_purchase
LEFT JOIN \`project.dataset.events_*\` later USING (user_pseudo_id)
WHERE later.event_name = 'purchase'
GROUP BY 1
ORDER BY 1;

LTV by acquisition source

Join the first-touch traffic source from GA4's traffic_source field with the sum of revenue per user. Gives you LTV by paid Meta vs paid Search vs organic vs direct.

Custom attribution model

Reconstruct the full conversion path from raw events. Build any attribution model you want — Markov chain, Shapley value, position-based, time-decay — directly in SQL. See data-driven attribution for the theory.

What you can do with BigQuery export that GA4 reports cannot

  • Cohort retention curves at any granularity.
  • LTV models with custom segmentation.
  • Joins with backend data (subscription status, support ticket volume, CRM stage).
  • Reverse-ETL audiences pushed back to ad platforms.
  • Custom attribution models in SQL or Python.
  • Real-time dashboards in Looker, Tableau, or Looker Studio against streamed BigQuery data.

Set it up the day you create the property

The single most important rule: enable BigQuery export the day you create a GA4 property. You cannot backfill historical events into BigQuery once they have passed. Teams who delay six months lose six months of granular event data forever.

What to read next

Sister pages: GA4 best practices, advanced GA4 ecommerce tracking, GA4 consent mode v2. For downstream use cases, read marketing mix modeling and marketing data lakes.