AI Mode Active

GA4 to BigQuery: The Queries a Marketing Leader Needs

published
Nov 18, 2026
modified
2026-11-18
author
Matt Kundo
categories
Analytics
topic_cluster
none
page_type
sub-page
read_time
14 min read
canonical
https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/
{ } Structured Data (Article Schema)
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "BlogPosting",
      "headline": "GA4 to BigQuery: The Queries a Marketing Leader Needs",
      "url": "https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/"
      },
      "author": {
        "@type": "Person",
        "name": "Matt Kundo",
        "jobTitle": "Founder and Growth Marketing Manager",
        "worksFor": {
          "@type": "Organization",
          "name": "Matt Kundo Digital Marketing"
        },
        "knowsAbout": [
          "Search engine optimization",
          "Generative engine optimization",
          "AI search visibility",
          "Digital marketing"
        ]
      },
      "description": "GA4 to BigQuery copies every raw GA4 event into your warehouse. Here are six SQL queries that follow B2B demo requests to MQL, SQL and pipeline, plus costs.",
      "publisher": {
        "@type": "Organization",
        "name": "Matt Kundo Digital Marketing",
        "url": "https://mattkundodigitalmarketing.com/"
      },
      "datePublished": "2026-11-18",
      "dateModified": "2026-11-18",
      "image": "https://mattkundodigitalmarketing.com/assets/blog/ga4-to-bigquery-queries/hero.jpg"
    },
    {
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "Is the GA4 BigQuery export free?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Yes, for standard GA4 properties the export itself has no GA4 charge. You pay BigQuery for storage and queries above the free tiers of 10 GiB and 1 TiB a month, plus $0.05 per GB if you turn on streaming. A site with a few hundred thousand events a month can often stay inside the free tiers, as the cost section shows."
          }
        },
        {
          "@type": "Question",
          "name": "Can I backfill GA4 history into BigQuery?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "No. The export starts the day you link it, and Google doesn't re-export past days. For earlier periods, the only route is aggregated report data, through the GA4 Data API or the Data Transfer Service's Google Analytics 4 connector, not raw events. Link the export now, even if you won't query it for months."
          }
        },
        {
          "@type": "Question",
          "name": "Do I need Analytics 360 for the BigQuery export?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Not unless you send more than about 1 million events a day or need complete data during the day. Analytics 360 raises the daily limit to 20 billion events and adds Fresh Daily export, which Google says typically arrives by 5am."
          }
        },
        {
          "@type": "Question",
          "name": "Should I use daily or streaming export?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Use daily export for anything you report on. Google describes streaming as best effort with no completeness guarantee, it leaves out traffic source for new users, and it costs $0.05 per GB. It's useful for same-day checks, like confirming a campaign launch is sending traffic."
          }
        },
        {
          "@type": "Question",
          "name": "How do I see AI assistant traffic in BigQuery?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Filter the session source in session_traffic_source_last_click for assistant domains such as chatgpt.com and perplexity.ai. I covered the GA4 side of this in a four-segment GA4 setup for LLM retrieval traffic."
          }
        }
      ]
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://mattkundodigitalmarketing.com/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Blog",
          "item": "https://mattkundodigitalmarketing.com/blog/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "GA4 to BigQuery queries",
          "item": "https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/"
        }
      ]
    }
  ]
}
> Content

GA4 to BigQuery is the free export that copies every raw Google Analytics 4 event into your own BigQuery project, one table per day. It lets you answer what the GA4 interface can't: which channels produce demo requests that turn into pipeline, how long buyers take to raise a hand, and which landing pages convert. The export is plumbing. The queries are the point, and this guide gives you six of them. It's one piece of the measurement layer in my complete guide to Google Analytics 4.

I built this guide from Google's own documentation, read on November 18, 2026, and linked each step and price to the page it came from. I haven't hand-tested this exact setup, so treat the SQL as a starting point and confirm your results with the checklist near the end. The worked example is an illustration: a B2B SaaS company whose site collects demo requests and free-trial sign-ups, and whose CRM moves those leads from MQL to SQL to opportunity.

Key takeaways

  • Standard GA4 properties can export up to 1 million events a day to BigQuery with no GA4 charge, and Google pauses the daily export if a property keeps going over (Set up BigQuery Export).
  • The export starts the day you link it. Google doesn't backfill history, and data that's already been exported can't be re-exported (BigQuery Export).
  • The free BigQuery sandbox gives you 10 GiB of storage and 1 TiB of queries a month, but every table expires after 60 days (Google Cloud).
  • For channel reporting, use the session_traffic_source_last_click record. Google added it on July 19, 2024, and it isn't filled in for older tables (GA4 release notes).
  • BigQuery won't exactly match the GA4 interface, by design: the export has no modeled consent data and no Google signals deduplication (Google for Developers).

Why move GA4 data into BigQuery at all?

A marketing leader moves GA4 data into BigQuery to join website behavior to CRM outcomes and to get exact, unsampled answers. The GA4 interface only reports on its own events. It can't tell you which demo requests became sales-qualified opportunities, because that outcome lives in your CRM.

Three limits push teams to the export. First, GA4 estimates users and sessions with HyperLogLog++, which Google says carries a precision of about ±1.63% for session counts at a 95% confidence interval (Minhaz Kazi, Google, 2023). Second, reports cap the custom dimensions you can register. Simo Ahava, an analytics developer and Senior Data Advocate at Reaktor, pointed out that parameters over those quotas "will still be passed through to the BigQuery export" (Simo Ahava, 2020). Third, and most important in B2B, pipeline gets decided weeks after the visit, in a system GA4 never sees.

How does GA4 data get from your site to BigQuery?

GA4 data reaches BigQuery through a link you create in GA4 Admin. Once a day, Google writes the previous day's raw events into a dataset named analytics_ plus your property ID, in a table called events_YYYYMMDD. If you turn on streaming, a second table, events_intraday_YYYYMMDD, fills within minutes and is deleted once the daily table is complete (BigQuery Export schema).

Here's the path for the B2B example:

  1. A buyer clicks an ad or a search result and lands on your site, and the Google tag records a session_start and a page_view.
  2. The buyer submits the demo form, and your tag sends generate_lead, the event Google recommends for a lead form. A trial sign-up sends sign_up.
  3. A hidden field on the form captures the buyer's GA4 client ID, and your CRM stores it on the lead.
  4. GA4 exports the day's events, typically by mid-afternoon in the property's time zone, and keeps updating that day's table for up to three days as late events arrive.
  5. A connector loads your CRM leads and opportunities into the same BigQuery project, and a query joins the two on the client ID.
Oil painting in the style of De Stijl: small red, yellow and blue squares travel along black lines into a stacked grid of daily rectangles, a picture of GA4 events landing in BigQuery tables

Steps 3 and 5 are the parts setup guides skip, and they're what make Query 6 possible. If your demo form redirects to a thank-you page, make sure generate_lead survives the redirect. I wrote up form submits that survive the redirect separately.

How do you set up the GA4 BigQuery export?

You set up the export in two places: a Google Cloud project with the BigQuery API enabled, then a BigQuery link in GA4 Admin. You need Editor access or higher on the GA4 property and an account with Owner access to the Cloud project (Set up BigQuery Export).

  1. In the Google Cloud console, create or pick a project, open APIs & Services, then Library, and enable the BigQuery API.
  2. Decide on billing now. The sandbox is free, but its 60-day expiry deletes your history and it can't take streaming data. For anything you'll report on past two months, attach a billing account.
  3. In GA4, go to Admin, then Product links, then BigQuery links, and click Link.
  4. Choose the Cloud project and a data location. Use the location your CRM data will live in, because a standard BigQuery query reads datasets from one location. Changing it later means deleting the link or replicating the dataset.
  5. Under data streams and events, pick your web stream. If you're close to the 1 million event limit, exclude noisy events here.
  6. Choose Daily export. Add Streaming only if you need same-day numbers, since it costs $0.05 per GB and leaves out traffic source for new users.
  7. Submit. Google says data should start arriving within 24 hours.

Then set a cost guardrail before anyone writes a query. BigQuery supports custom quotas at the user and project level and a maximum bytes billed setting per query (BigQuery pricing).

Which traffic source field answers which question?

The export carries three traffic source fields, and each one answers a different question. Pick the wrong one and your channel report is quietly wrong. AI answers repeat the mistake: Perplexity's answer to this topic on November 18, 2026 computed first touch from collected_traffic_source, the event-level field. The rule that keeps them straight is what I call the Scope Match: match the field's scope to the scope of your question.

Your questionScopeField to useWhat it holds
Where did this person first come from?Usertraffic_source, read on the first_visit eventThe source that first acquired the user
Which channel brought this visit?Sessionsession_traffic_source_last_clickLast non-direct click for the session, repeated on every event
What campaign tags were on this exact hit?Eventcollected_traffic_sourceRaw UTM values and click IDs, with no attribution model

Johan van de Werken, who runs GA4BigQuery, puts the difference plainly: the session record's values "are session-scoped and use the last non-direct click attribution model, where collected_traffic_source are event-scoped and no attribution model is applied" (GA4BigQuery). He also notes that, like any schema change, the session record "is not retroactively added to tables or populated with data."

Oil painting in the style of De Stijl: a large blue rectangle holds yellow rectangles that hold small red squares, a picture of user, session and event scope

One wrinkle is worth knowing. Google's schema reference describes traffic_source as the source that first acquired the user. Google's traffic attribution reference, updated April 14, 2026, says that on conversion events the same fields now hold cross-channel last-click attribution. Both documents agree that traffic_source on the first_visit event is the user's first source, so that's how Query 3 reads it.

Which queries does a marketing leader need?

A marketing leader needs six queries: a daily health check, demo requests by session channel, the first-touch source of demo requesters, landing page conversion, time to demo, and a CRM join that follows demo requests to MQL, SQL and opportunity. Each one starts from the question it answers.

They follow Google's documented patterns (Basic queries). Replace your-project.analytics_123456789 with your own project and dataset. Filter dates using _TABLE_SUFFIX. A date-range filter like the ones below also keeps the intraday tables out, because their suffix starts with "intraday_". Pull an event parameter with a subquery over UNNEST(event_params). Identify a session with user_pseudo_id plus the ga_session_id parameter, since ga_session_id alone isn't unique across users.

Krisztian Korpa of GA4Dataform describes the first encounter well: "You finally got your GA4 data in BigQuery. You write your first query. And then you meet UNNEST" (GA4Dataform, 2026). The pattern is unfamiliar the first time, and then it becomes boilerplate.

Query 1: did each day's export land, and is anything broken?

This health check counts events, browsers, demo requests and trial sign-ups per day for the last two weeks, plus events with no session ID. Run it first. A missing day means the export failed. A climb toward 1 million events means you're near the daily limit. A rising count of events without a session ID usually means a server-side or Measurement Protocol feed isn't sending one. If you run consent mode, split that count by privacy_info.analytics_storage, because consent-denied pings can account for part of it.

-- Question: did each day's export land, and is anything broken?
SELECT
  _TABLE_SUFFIX AS export_date,
  COUNT(*) AS events,
  COUNT(DISTINCT user_pseudo_id) AS browsers,
  COUNTIF(event_name = 'generate_lead') AS demo_requests,
  COUNTIF(event_name = 'sign_up') AS trial_signups,
  COUNTIF((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') IS NULL) AS events_without_session_id
FROM `your-project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 14 DAY))
  AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
GROUP BY 1
ORDER BY 1;

Query 2: which channels bring sessions that request a demo?

This query counts demo requests by the channel of the session they happened in, which is the number most dashboards get wrong. It reads session_traffic_source_last_click, which Google repeats on every event in a session, so one value per session is enough. Google Ads clicks also fill a google_ads_campaign sub-record with campaign names the export didn't carry before July 2024.

-- Question: which channels bring sessions that request a demo?
WITH sessions AS (
  SELECT
    user_pseudo_id,
    (SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS session_id,
    ANY_VALUE(session_traffic_source_last_click.manual_campaign.source) AS sess_source,
    ANY_VALUE(session_traffic_source_last_click.manual_campaign.medium) AS sess_medium,
    ANY_VALUE(COALESCE(
      session_traffic_source_last_click.google_ads_campaign.campaign_name,
      session_traffic_source_last_click.manual_campaign.campaign_name)) AS sess_campaign,
    MAX(IF(event_name = 'generate_lead', 1, 0)) AS requested_demo,
    MAX(IF(event_name = 'sign_up', 1, 0)) AS started_trial
  FROM `your-project.analytics_123456789.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
  GROUP BY user_pseudo_id, session_id
)
SELECT
  IFNULL(sess_source, '(direct)') AS session_source,
  IFNULL(sess_medium, '(none)') AS session_medium,
  IFNULL(sess_campaign, '(not set)') AS session_campaign,
  COUNT(*) AS sessions,
  SUM(requested_demo) AS demo_sessions,
  SUM(started_trial) AS trial_sessions,
  ROUND(100 * SAFE_DIVIDE(SUM(requested_demo), COUNT(*)), 2) AS demo_rate_pct
FROM sessions
WHERE session_id IS NOT NULL
GROUP BY session_source, session_medium, session_campaign
ORDER BY demo_sessions DESC;

Read the demo rate next to the counts. If a channel brings a third of your demo sessions at half the average demo rate, that's a budget conversation, not a win.

Query 3: where did demo requesters first come from?

A user's first touch is the source of their first visit, and the dependable place to read it is the first_visit event. This query finds the users who requested a demo in October, then looks up their first visit across the entire export. Users whose first visit came before you linked BigQuery, or before the query's start date, show up as "(first visit before export)". For the first few months of the export, expect that bucket to be large. A buyer who cleared cookies gets a new user_pseudo_id with its own first_visit, so they show up with a source, just not their original one.

-- Question: where did the people who requested a demo first come from?
WITH first_touch AS (
  SELECT
    user_pseudo_id,
    ANY_VALUE(traffic_source.source) AS first_source,
    ANY_VALUE(traffic_source.medium) AS first_medium
  FROM `your-project.analytics_123456789.events_*`
  WHERE event_name = 'first_visit'
    AND _TABLE_SUFFIX BETWEEN '20250101' AND '20261031'
  GROUP BY user_pseudo_id
),
demo_requesters AS (
  SELECT DISTINCT user_pseudo_id
  FROM `your-project.analytics_123456789.events_*`
  WHERE event_name = 'generate_lead'
    AND _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
)
SELECT
  IFNULL(f.first_source, '(first visit before export)') AS first_touch_source,
  IFNULL(f.first_medium, '(unknown)') AS first_touch_medium,
  COUNT(*) AS requester_count
FROM demo_requesters AS d
LEFT JOIN first_touch AS f USING (user_pseudo_id)
GROUP BY first_touch_source, first_touch_medium
ORDER BY requester_count DESC;

The wide date range in the first_touch step is the costly part. It only reads a handful of columns, so it stays small on most B2B sites, but check the bytes estimate in the BigQuery editor before you run it.

Query 4: which landing pages turn visits into demo requests?

The landing page is the page_location on a session's session_start event. This query strips query strings, so UTM-tagged versions of a page roll up together, and then ranks pages by demo-requesting sessions. A 100-session floor keeps small samples from reaching the top of the list.

-- Question: which landing pages turn visits into demo requests?
WITH sessions AS (
  SELECT
    user_pseudo_id,
    (SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS session_id,
    MAX(IF(event_name = 'session_start',
      SPLIT((SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location'), '?')[SAFE_OFFSET(0)],
      NULL)) AS landing_page,
    MAX(IF(event_name = 'generate_lead', 1, 0)) AS requested_demo
  FROM `your-project.analytics_123456789.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
  GROUP BY user_pseudo_id, session_id
)
SELECT
  landing_page,
  COUNT(*) AS sessions,
  SUM(requested_demo) AS demo_sessions,
  ROUND(100 * SAFE_DIVIDE(SUM(requested_demo), COUNT(*)), 2) AS demo_rate_pct
FROM sessions
WHERE landing_page IS NOT NULL
GROUP BY landing_page
HAVING COUNT(*) >= 100
ORDER BY demo_sessions DESC;

Query 5: how long, and how many visits, before someone asks for a demo?

This query measures the gap between a buyer's first visit and their first demo request in the window, using the user_first_touch_timestamp field and the ga_session_number parameter. The median and the 90th percentile set your retargeting and lookback windows. They also explain to a CEO why last week's spend won't show up in this week's pipeline.

-- Question: how long, and how many visits, before someone asks for a demo?
WITH first_demo AS (
  SELECT
    user_pseudo_id,
    MIN(event_timestamp) AS demo_ts,
    MIN(user_first_touch_timestamp) AS first_touch_ts,
    MIN((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_number')) AS session_number
  FROM `your-project.analytics_123456789.events_*`
  WHERE event_name = 'generate_lead'
    AND _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
  GROUP BY user_pseudo_id
)
SELECT
  COUNT(*) AS requester_count,
  APPROX_QUANTILES(TIMESTAMP_DIFF(TIMESTAMP_MICROS(demo_ts), TIMESTAMP_MICROS(first_touch_ts), DAY), 100)[OFFSET(50)] AS median_days_to_demo,
  APPROX_QUANTILES(TIMESTAMP_DIFF(TIMESTAMP_MICROS(demo_ts), TIMESTAMP_MICROS(first_touch_ts), DAY), 100)[OFFSET(90)] AS p90_days_to_demo,
  APPROX_QUANTILES(session_number, 100)[OFFSET(50)] AS median_session_number
FROM first_demo
WHERE first_touch_ts IS NOT NULL;

Both numbers are floors, because they come from a browser cookie. A buyer who switches devices or clears cookies starts back at day zero and session one.

Query 6: which channels produce pipeline, not just form fills?

This is the query that justifies the setup. It takes each demo requester's session channel from GA4, joins it to the CRM on the client ID your form captured, and counts how many became MQLs, SQLs and opportunities, with the pipeline value. Use a window old enough for leads to have moved through the funnel, which is why the example reads July through September.

Two things have to exist first. The demo form needs a hidden field holding the GA4 client ID, which the Google tag returns through gtag('get', 'G-XXXXXXXXXX', 'client_id', callback) (Google tag API reference). On a web stream, that's the same value the export stores as user_pseudo_id. Your CRM data also has to be in BigQuery. Google's pricing page lists a generally available Salesforce connector and a HubSpot connector in preview for the BigQuery Data Transfer Service, or you can use a third-party pipeline. The table and column names below are illustrations, so map them to whatever your connector creates.

-- Question: which session channels produce pipeline, not just form fills?
-- crm.leads and crm.opportunities are illustrative names for your CRM export.
WITH demo_requesters AS (
  SELECT
    user_pseudo_id,
    ARRAY_AGG(STRUCT(
      session_traffic_source_last_click.manual_campaign.source AS source,
      session_traffic_source_last_click.manual_campaign.medium AS medium)
      ORDER BY event_timestamp LIMIT 1)[OFFSET(0)] AS channel
  FROM `your-project.analytics_123456789.events_*`
  WHERE event_name = 'generate_lead'
    AND _TABLE_SUFFIX BETWEEN '20260701' AND '20260930'
  GROUP BY user_pseudo_id
),
pipeline AS (
  SELECT
    l.ga_client_id,
    LOGICAL_OR(l.became_mql_at IS NOT NULL) AS reached_mql,
    LOGICAL_OR(l.became_sql_at IS NOT NULL) AS reached_sql,
    COUNT(DISTINCT o.opportunity_id) AS opportunities,
    SUM(o.amount) AS pipeline_amount
  FROM `your-project.crm.leads` AS l
  LEFT JOIN `your-project.crm.opportunities` AS o USING (lead_id)
  WHERE l.ga_client_id IS NOT NULL
  GROUP BY l.ga_client_id
)
SELECT
  IFNULL(d.channel.source, '(direct)') AS session_source,
  IFNULL(d.channel.medium, '(none)') AS session_medium,
  COUNT(*) AS requester_count,
  COUNTIF(p.reached_mql) AS mql_count,
  COUNTIF(p.reached_sql) AS sql_count,
  SUM(IFNULL(p.opportunities, 0)) AS opportunity_count,
  SUM(IFNULL(p.pipeline_amount, 0)) AS pipeline_value
FROM demo_requesters AS d
LEFT JOIN pipeline AS p ON p.ga_client_id = d.user_pseudo_id
GROUP BY session_source, session_medium
ORDER BY pipeline_value DESC;
Oil painting in the style of De Stijl: five stacked color bands narrow from top to bottom, a picture of a B2B funnel from sessions to opportunities

A demo request that never reaches MQL is a cost, not a win, and this table shows which channels produce each kind. It's the same idea as counting every enrollment source against the whole channel mix for an energy retailer, applied to a SaaS funnel. Two limits apply. The join credits the browser that filled in the form, so research on a second device stays invisible unless you also send a user_id. And session last click is still a model, so test whether a channel causes pipeline with incrementality testing before you move real budget.

Once the join works, send those stages back to the ad platforms so bidding learns from pipeline instead of form fills. I covered that for HubSpot deals and for Salesforce pipeline stages.

Why won't BigQuery match the GA4 interface?

BigQuery won't match the GA4 interface exactly because the export holds collected data, while the interface adds modeling, estimates and deduplication. Minhaz Kazi, a Developer Advocate for Google Analytics, wrote that the two "aren't expected to be reconcilable" on those additions, and that "if there is internal consistency in both and they match with what you are collecting, you should be good to go" (Google for Developers, 2023).

These are the gaps you'll run into:

  • Consent mode is the biggest. When visitors deny consent, GA4 fills the gap with modeled behavior and key events, and none of that modeled data is in the export. Cookieless pings also arrive with a new user_pseudo_id for each session, so BigQuery can show more users than GA4 does.
  • Google signals can deduplicate users across devices in GA4 reports, but the export carries no signals data.
  • GA4 estimates sessions and users with HyperLogLog++, while COUNT(DISTINCT) in SQL is exact.
  • Daily tables keep updating for up to 72 hours, so compare days that are at least three days old.
  • GA4 reports apply your property's attribution settings, while Query 2 uses session last non-direct click only.

If you use consent mode with Google Ads, my post on consent mode v2 and attribution covers what changes on the ads side.

What does the GA4 BigQuery export cost?

The GA4 export has no GA4 charge for a standard property. At typical B2B SaaS traffic, the BigQuery bill can stay at or near zero. The risk is a careless query, not the export. These are Google's list prices as shown on November 18, 2026. The query and storage rates are for us-central1 (Iowa), the location in Google's own pricing example, and other locations, including the US multi-region, are priced separately.

ItemPrice, as of November 18, 2026Source
GA4 BigQuery Export, standard propertyNo GA4 charge, daily export up to 1 million events a dayGA4 Help
GA4 BigQuery Export, Analytics 360Daily export up to 20 billion events a day, plus Fresh DailyGA4 Help
BigQuery sandbox$0, with 10 GiB of storage, 1 TiB of queries a month and a 60-day table expiryGoogle Cloud
On-demand queries, us-central1First 1 TiB a month free, then $6.25 per TiB, with a 10 MB minimum per table referencedBigQuery pricing
Active logical storage, us-central1First 10 GiB a month free, then $0.000031507 per GiB-hour, which Google's own example puts at $23.552 for 1 TiB for a full monthBigQuery pricing
Long-term logical storage, us-central1$0.000021918 per GiB-hour for tables untouched for 90 daysBigQuery pricing
Streaming export$0.05 per GB, about 600,000 events per GBGA4 Help
Data Transfer Service, Google Ads and GA4 connectorsNo charge for transfer orchestrationBigQuery pricing
Data Transfer Service, Salesforce connectorBilled by the compute it uses, in slot-hoursBigQuery pricing
Data Transfer Service, HubSpot connectorIn preview, not charged until it's generally availableBigQuery pricing

This is a quick picture, not a quote. A site sending about 300,000 events a month adds about half a gigabyte a month, going by Google's estimate of 600,000 events per gigabyte. A year of that is about 6 GB, which fits inside the free 10 GiB storage tier. Scanning that year 100 times in a month reads about 600 GB, which is still less than the free terabyte. The bill shows up when someone runs events_* without a date filter on a much larger property.

If you would rather have someone set up the export and the CRM join for you, that's part of my analytics and reporting work.

How do you check the setup works?

Run this checklist a week after you link the export, and again after you change your tags or CRM fields.

  1. The dataset analytics_ plus your property ID exists, and a new events_ table appears every day.
  2. Query 1 shows no missing days and a daily event count well under 1 million.
  3. For a day at least three days old, demo requests in Query 1 land close to the generate_lead count in GA4. Close, not equal.
  4. session_traffic_source_last_click.manual_campaign.source isn't null on recent events.
  5. events_without_session_id in Query 1 is near zero, or the remainder traces to consent-denied traffic.
  6. If you're on the sandbox, billing is attached before your oldest table reaches 60 days.
  7. Most new demo-request leads in the CRM carry the GA4 client ID. A low share means the hidden field isn't filling.
  8. A project-level query quota or a maximum bytes billed setting is in place.

What breaks most often?

Most issues with the GA4 BigQuery export are silent. Tables still arrive, but the numbers in them are wrong or incomplete. This table lists the issues that Google's documentation and the practitioners above describe, with the fix for each.

SymptomLikely causeFix
Daily tables stop appearingThe property kept exceeding 1 million events a day, or the Cloud payment method failedExclude events or streams in the link settings, and fix billing. Days lost to an invalid payment method can't be re-exported
History disappears after two monthsThe sandbox's 60-day table expiryAttach billing, then remove the expiration on the dataset and on tables that already exist
First-touch report is mostly direct or blankThe query reads collected_traffic_source, or reads intraday tablesRead traffic_source on first_visit, from daily tables
Same-day data has no source for new usersStreaming export leaves out new-user traffic sourceReport attribution from the daily tables
One day looks short or longThe property time zone changed, which shortens or lengthens that day's export windowFlag that date and leave it out of trends
A query bill spikesevents_* queried without a _TABLE_SUFFIX filterAlways filter dates, and set maximum bytes billed
The CRM join returns almost nothingThe hidden field stores the full _ga cookie value instead of the client ID, or the datasets sit in different locationsStore only the client ID, and keep both datasets in one location
Some Google Ads clicks have no click IDGoogle doesn't include gbraid and wbraid in the exportUse the google_ads_campaign fields in session_traffic_source_last_click for campaign names

Frequently asked questions

Is the GA4 BigQuery export free?

Yes, for standard GA4 properties the export itself has no GA4 charge. You pay BigQuery for storage and queries above the free tiers of 10 GiB and 1 TiB a month, plus $0.05 per GB if you turn on streaming. A site with a few hundred thousand events a month can often stay inside the free tiers, as the cost section shows.

Can I backfill GA4 history into BigQuery?

No. The export starts the day you link it, and Google doesn't re-export past days. For earlier periods, the only route is aggregated report data, through the GA4 Data API or the Data Transfer Service's Google Analytics 4 connector, not raw events. Link the export now, even if you won't query it for months.

Do I need Analytics 360 for the BigQuery export?

Not unless you send more than about 1 million events a day or need complete data during the day. Analytics 360 raises the daily limit to 20 billion events and adds Fresh Daily export, which Google says typically arrives by 5am.

Should I use daily or streaming export?

Use daily export for anything you report on. Google describes streaming as best effort with no completeness guarantee, it leaves out traffic source for new users, and it costs $0.05 per GB. It's useful for same-day checks, like confirming a campaign launch is sending traffic.

How do I see AI assistant traffic in BigQuery?

Filter the session source in session_traffic_source_last_click for assistant domains such as chatgpt.com and perplexity.ai. I covered the GA4 side of this in a four-segment GA4 setup for LLM retrieval traffic.

◆ Entity Graph
No topic cluster assigned
# Machine-Readable Metadata
{
  "url": "https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/",
  "ai_url": "https://mattkundodigitalmarketing.com/ai/blog/ga4-to-bigquery-queries/",
  "content_type": "sub-page",
  "topic_cluster": "none",
  "categories": ["Analytics"],
  "published": "Nov 18, 2026",
  "canonical": "https://mattkundodigitalmarketing.com/blog/ga4-to-bigquery-queries/",
  "llms_txt": "https://mattkundodigitalmarketing.com/llms.txt"
}