Skip to content
Nosey Parkers
All posts
Data Engineering12 March 2026 · 1 min read

You linked GA4 to BigQuery. Now what?

The first five SQL queries worth running on your GA4 export — and the event-parameter unnesting pattern everything else builds on.

Linking GA4 to BigQuery takes five minutes and is free. Then you open the events_* tables, see a nested event_params column, and close the tab. This post is the bridge across that gap.

The one pattern to learn

GA4 stores event parameters as an array of key-value structs. Almost every useful query starts by unnesting them:

SELECT
  event_date,
  event_name,
  (SELECT value.string_value
     FROM UNNEST(event_params)
    WHERE key = 'page_location') AS page_location,
  (SELECT value.int_value
     FROM UNNEST(event_params)
    WHERE key = 'ga_session_id') AS session_id
FROM `your-project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20260301' AND '20260331'

Once that clicks, GA4's export stops being scary. It's just events, one row each, with parameters you pluck out as needed.

Five queries that earn their keep

1. True daily sessions — counted from ga_session_id, not sampled, not thresholded like the GA4 UI.

2. Landing page performance — first page_view per session joined to session conversion outcomes. The UI makes this weirdly hard; SQL makes it two CTEs.

3. The full journey for any converter — every event, in order, for users who purchased:

SELECT user_pseudo_id, event_timestamp, event_name
FROM `your-project.analytics_123456.events_*`
WHERE user_pseudo_id IN (
  SELECT DISTINCT user_pseudo_id
  FROM `your-project.analytics_123456.events_*`
  WHERE event_name = 'purchase'
)
ORDER BY user_pseudo_id, event_timestamp

4. Channel overlap — how many purchasers touched both paid search and paid social before converting. This single number usually reframes the entire budget debate.

5. Data quality canary — daily event counts by event name, week over week. When a developer accidentally removes a tag, this query notices before your quarterly report does.

Why bother, honestly

Because the GA4 interface answers the questions Google thought you'd ask, while BigQuery answers the questions you ask. Attribution windows, custom sessionisation, joining ad spend to revenue at order level — all of it becomes ordinary SQL. And at typical data volumes, the monthly bill is pennies.

Keep reading

Ready to see what your data has been trying to tell you?

Book a free discovery call. We'll look at your current setup, tell you what's broken, and show you exactly what better looks like — no obligation, no fluff.