In brief
- GA4’s free BigQuery export gives you every raw event, without sampling or row limits.
- Standard properties can export up to 1 million events a day, from the day you link.
- Save these eight queries, and always filter dates to keep costs low.
GA4’s reports are fine for a quick look. But the moment you need something specific, such as sessions by your own channel grouping or a funnel without sampling, you hit a wall. The BigQuery export removes it: every raw event, yours to query. Here’s how to start, and eight queries worth saving.
For African teams there’s a practical reason too. BigQuery’s free tier covers a lot of small-site use, so you can own your analytics history without an enterprise tool, and keep the detail that GA4 deletes after 14 months.
Set it up
- Create a Google Cloud project. You can start in the BigQuery sandbox, which needs no billing account.
- In GA4, go to Admin → Product links → BigQuery links and link the project.
- Choose Daily export. Streaming adds same-day data but costs extra.
- Wait a day, then open BigQuery. GA4 creates a dataset named
analytics_followed by your property ID, and a new table appears each day.
Three things to know. Standard GA4 properties can export up to 1 million events a day. Exports start from the day you link, with no history. And the sandbox deletes tables after 60 days, so add billing once you rely on it. Storage and queries beyond the free tier are charged in US dollars, so set a budget alert.
How the data is shaped

Each day is a table called events_YYYYMMDD, with one row per event. Details like the page URL sit inside a nested field, event_params, which you open with UNNEST. Replace project.analytics_123456 below with your own project and dataset.
Eight queries to save
1. Daily users, sessions and page views
SELECT event_date,
COUNT(DISTINCT user_pseudo_id) AS users,
COUNT(DISTINCT CONCAT(user_pseudo_id,
(SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id'))) AS sessions,
COUNTIF(event_name = 'page_view') AS page_views
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY event_date
ORDER BY event_date;
What it tells you: Your baseline. If these numbers are far from the GA4 interface, check your date range and time zone first: the export uses the property’s time zone in event_date.
2. Top pages
SELECT
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') AS page,
COUNT(*) AS views
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
AND event_name = 'page_view'
GROUP BY page
ORDER BY views DESC
LIMIT 25;
What it tells you: The page report without sampling or row limits. Strip query strings with REGEXP_REPLACE if campaign tags split the same page into many rows.
3. New users by first source and medium
SELECT traffic_source.source, traffic_source.medium,
COUNT(DISTINCT user_pseudo_id) AS new_users
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
AND event_name = 'first_visit'
GROUP BY 1, 2
ORDER BY new_users DESC;
What it tells you: Where new users first came from. The traffic_source field is the user’s first acquisition source and never changes, so don’t use it for session reporting.
4. 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,
(SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id'))) AS sessions
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY 1, 2
ORDER BY sessions DESC;
What it tells you: This is the one most people need for campaign reporting. It reads the source and medium of each session from your UTM tags, using session-level fields GA4 added to the export in 2024.
5. Conversions by event
SELECT event_name, COUNT(*) AS events,
COUNT(DISTINCT user_pseudo_id) AS users
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
AND event_name IN ('generate_lead', 'purchase', 'sign_up')
GROUP BY event_name;
What it tells you: Swap in your own key events. Counting users as well as events shows whether one enthusiastic visitor is inflating your results.
6. Device and country
SELECT device.category, geo.country,
COUNT(DISTINCT user_pseudo_id) AS users
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY 1, 2
ORDER BY users DESC;
What it tells you: Useful for checking how mobile-first your audience is, market by market. In most African markets, expect mobile to dominate.
7. A simple two-step funnel (users who viewed a page, then converted)
WITH steps AS (
SELECT user_pseudo_id,
MIN(IF(event_name = 'page_view', event_timestamp, NULL)) AS viewed,
MIN(IF(event_name = 'generate_lead', event_timestamp, NULL)) AS converted
FROM `project.analytics_123456.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY user_pseudo_id)
SELECT COUNTIF(viewed IS NOT NULL) AS step1_users,
COUNTIF(converted > viewed) AS step2_users
FROM steps;
What it tells you: A starting pattern you can extend to more steps. Unlike GA4’s funnel reports, you control the rules and nothing is sampled.
8. Check what’s costing you (run in the BigQuery console)
SELECT user_email, DATE(creation_time) AS day,
ROUND(SUM(total_bytes_billed) / POW(1024, 4), 3) AS tb_billed
FROM `region-eu`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
GROUP BY 1, 2
ORDER BY day DESC;
Change region-eu to the region your dataset lives in.
Common mistakes
- Expecting an exact match with GA4. The interface uses modelling, thresholds and Google signals; the export is raw events. Small differences are normal.
- Counting sessions by
session_start. Sessions that cross midnight or arrive without that event get missed. Combineuser_pseudo_idandga_session_id, as above. - Forgetting consent. If you use Consent Mode, users who decline analytics cookies send cookieless pings, so those events have no stable user ID. Your user counts will be lower than your event counts suggest.
- Querying the intraday table for reports.
events_intraday_tables are replaced when the daily table lands. Use them for same-day checks only.
Keep costs low
- Always filter on
_TABLE_SUFFIX. Without it, every query scans every day you’ve ever exported. - Select only the columns you need. BigQuery charges by data scanned, not rows returned.
- Check the estimate first. The console shows how much a query will process before you run it.
Where to go next
- Save results as tables. Turn a query you run every week into a scheduled query that writes a small summary table. Reports then read the summary, not the raw events, which is faster and cheaper.
- Connect Looker Studio. Point a dashboard at those summary tables and your clients see numbers you defined, not GA4’s defaults.
- Join your other data. Upload ad spend or CRM leads to the same project and you can calculate cost per lead by campaign in one query. That’s the real payoff of owning the data.
Pair this with our guide to GA4 data retention: the export is how you keep detail beyond GA4’s 14-month limit.
Read next: The 10 free certifications every African media planner should have
Sources
Researched and drafted with AI assistance, then reviewed, tested and edited by Pilira Mwambala. See our Editorial & AI Policy.




