Connect GA4 BigQuery export

Connecting your GA4 BigQuery export gives Squoosh a raw-event source to calibrate synthetic shoppers against — the same device/geography/traffic-source/conversion depth as the standard Google Analytics connection, read directly from your exported event data instead of the GA4 reporting API. This page covers what the connection does, the two-part setup, and its limits.

Beta — the most technical setup of Squoosh's connectors

This connector queries BigQuery directly with a service account you provide, so it needs two things set up first: GA4's own BigQuery export linked to a dataset, and a Google Cloud service account with read access to it. If you just want a standard GA4 connection without touching BigQuery or GCP, use Connect Google Analytics instead — it's simpler and covers the same ground for most customers.

What the connection does

This connector reads raw GA4 export events straight from BigQuery and builds synthetic shoppers whose mix of device, traffic source, and geography matches your real visitors, plus a conversion rate when you name a key event. It's an alternative path to the same calibration outcome as Google Analytics — useful if you're already exporting GA4 to BigQuery for other analysis and want Squoosh to read from the same place.

The connection is not required to run a test — Squoosh can build a pool from a general e-commerce mix without it. For how the calibrated pool behaves and how the match is measured, see Synthetic shoppers.

Before you connect

Two things need to exist first, both outside Squoosh:

  1. Link GA4 to BigQuery. In your GA4 property's Admin settings, under Product Links → BigQuery Links, link the property to a BigQuery project and dataset (Google's own feature — see GA4's documentation if you haven't set this up before). Give the export a day to start populating before connecting Squoosh.
  2. Create a read-only service account. In Google Cloud, create a service account with BigQuery Data Viewer on the dataset (or the project) and BigQuery Job User on the project — Job User can only be granted at the project level (running a query job is a project-level permission; Google Cloud won't let you scope it to a single dataset), then download its JSON key. Squoosh only ever queries with this service account — it never touches your organization's own Google credentials.

Connect GA4 BigQuery export

  1. In the sidebar, click Integrations.
  2. In the GA4 BigQuery export row, click Connect.
  3. Enter:
  4. Service account JSON — paste the full contents of the service account key file you downloaded. Kept private; Squoosh never shows it again after you save it.
  5. GCP project — the Google Cloud project ID that owns the export.
  6. Dataset — the BigQuery dataset name GA4 exports into, e.g. analytics_123456.
  7. Key event name (optional) — the GA4 event that counts as a conversion, e.g. purchase. Leave it blank if you don't want a conversion rate calibrated from this source.
  8. Dataset location (optional) — the BigQuery region your export dataset lives in, e.g. EU or europe-west1. Leave it blank if your dataset is in the US multi-region (BigQuery's default); if your GA4→BigQuery link was created for an EU (or other non-US) property, set this or the connection will fail to find your dataset.
  9. Click Connect.

Squoosh runs a cheap dry-run query against your configured project and dataset before saving — a dry run resolves the actual export table and checks read permission without scanning any data or incurring cost, so a mistyped dataset name or a service account missing Data Viewer on it fails verification immediately, not on the first real calibration read. The row shows Connected — syncing while that first read runs, then Calibrating shoppers from GA4 BigQuery export once real data is grounding your shopper pool.

What it grounds

Dimension Source Notes
Device device.category
Geography geo.country
Traffic source collected_traffic_source (medium/source)
Conversion rate Distinct sessions vs. your key event, over the export's own 30-day window Always a fixed 30-day lookback — see below.

A dimension needs a reasonable amount of traffic before Squoosh treats it as real signal — a handful of sessions doesn't become a fabricated distribution. Below that floor, Squoosh leaves the dimension out of calibration rather than guessing.

Limits and caveats

  • Always a fixed 30-day window. Every calibration read covers exactly the last 30 days of exported data, not Squoosh's usual configurable window.
  • No key event configured means no conversion rate. Squoosh never invents one.
  • Read access only. The service account you provide needs no write permissions — BigQuery Data Viewer on the dataset plus BigQuery Job User on the project (to run the query) is enough.
  • If your project/dataset ID contains characters outside letters, digits, underscores, and hyphens, the connection is rejected before any query runs — GA4 BigQuery export project and dataset names don't normally include anything else.

Troubleshooting

Problem What to do
"service account JSON could not be parsed" Paste the full JSON key file contents exactly as downloaded — not a partial copy or a reformatted version.
"service account JSON is missing client_email or private_key" The pasted JSON isn't a valid service-account key — re-download it from Google Cloud.
"dataset ... was not found or is not accessible" Confirm the service account has BigQuery Data Viewer on the exact dataset and that the dataset name matches what GA4 exports into — and check Dataset location: if your export dataset isn't in the US multi-region, this exact error is what a missing/wrong location setting looks like.
Connection authenticates but no data shows up The GA4 → BigQuery link may be too new — give the export at least a full day to populate before the first calibration read.