← Back to Blog

BigQuery Can Reconstruct the AI Traffic GA4 Hides

GA4’s channel classification discards referrer data that BigQuery’s raw event export preserves. The collected_traffic_source record and page_referrer event parameter contain the original source information for every session — including AI-referred visits that GA4 dumped into Direct. A SQL query against the BigQuery export can surface AI traffic that the GA4 interface will never show. Loamly found 70.6% of AI sessions arrive without referrer headers, but BigQuery also enables behavioural pattern matching to probabilistically identify AI-driven visits even when the referrer is genuinely absent.

What BigQuery Sees That GA4 Doesn’t

GA4’s interface applies channel classification before showing you results. BigQuery receives the raw data before those rules run — and keeps it.

GA4 and BigQuery receive the same event data. The difference is what happens next. GA4’s interface applies channel classification rules, last-non-direct attribution, data thresholding, and sampling before you see any results. BigQuery receives the raw, unprocessed event stream — every field, every parameter, every referrer string — before GA4’s classification pipeline touches it.

This matters for AI traffic because GA4’s classification is where the data disappears. A session from chatgpt.com on mobile arrives without a referrer header. GA4 classifies it as Direct. The original referrer field is empty, and GA4 moves on. But BigQuery still records the event-level data that surrounds that session — the landing page, the device type, the engagement pattern, the timestamp — which can be used to reconstruct what GA4 threw away.

70.6% of AI-referred traffic arrives without a referrer header and GA4 classifies it as Direct, per Loamly’s analysis of 446,405 visits. For the sessions that do carry a referrer, GA4 may still misclassify them — routing chatgpt.com to Referral instead of AI, or routing google.com AI Mode clicks to Organic. BigQuery preserves the raw referrer string regardless of what GA4’s channel rules decide to do with it.

You may be interested in: Stop Calling It AI Traffic — Six Types Your Analytics Mixes Together

The collected_traffic_source record provides raw, unattributed per-event traffic source values that bypass GA4’s last-non-direct attribution model — revealing sources that the UI overwrites.

The Four Traffic Source Structures in BigQuery

GA4’s BigQuery export stores traffic source data in four separate locations — each scoped differently, each preserving different levels of raw referrer information.

This is where most analysts get stuck. The GA4 BigQuery export contains four competing traffic-source structures: traffic_source, session_traffic_source_last_click, collected_traffic_source, and event_params. They don’t contain the same data, and using the wrong one for AI traffic analysis will give you wrong results.

traffic_source. User-scoped. Records the first-touch acquisition source for each user. Once set, it doesn’t change. Useful for understanding how a user first arrived, but not for detecting AI referrals in subsequent sessions.

session_traffic_source_last_click. Session-scoped with last-non-direct attribution applied. This is what reconciles with the GA4 UI. If a session starts as Direct but the user had a previous non-direct session, the previous source may carry forward. For AI traffic, this means some Direct sessions get re-attributed — but the re-attribution uses GA4’s rules, not the raw referrer.

collected_traffic_source. Event-scoped, raw and unattributed. This is the field you want. The values are raw — session scoping has not been applied, neither has last-non-direct attribution. It shows the actual traffic source information parsed from the browser at the moment the event was collected. If a chatgpt.com referrer was present, it’s here even if GA4’s UI classified the session as something else.

event_params. Legacy per-event key-value pairs. Source, medium, and campaign are available as string parameters, but querying them requires UNNEST operations that cost more compute. Use collected_traffic_source instead unless you need backward compatibility.

The Query: Finding AI Referrers in Raw Event Data

A SQL query against collected_traffic_source and page_referrer surfaces AI traffic that GA4’s interface will never show you.

The approach has two layers. First, find sessions where the raw referrer contains a known AI assistant domain. Second, find referrer-less sessions whose behavioural fingerprint matches AI-referred traffic.

Layer one: referrer domain matching. The page_referrer event parameter contains the full referring URL before GA4 applies channel rules. Query it for AI assistant domains — chatgpt.com, claude.ai, perplexity.ai, gemini.google.com, copilot.microsoft.com — and you’ll find sessions that GA4’s interface may have classified as Referral, Direct, or even Organic rather than AI.

The query scans event_params for the page_referrer key and filters for AI domain patterns using a regular expression. The regex covers the primary AI platforms as of 2026 and should be updated quarterly as new platforms emerge and existing ones change referrer formats.

Layer two: collected_traffic_source cross-reference. For sessions where page_referrer is empty (the 70.6% case), check whether collected_traffic_source.manual_source contains an AI domain. GA4 sometimes receives partial source information that the UI discards during classification but BigQuery preserves.

The combination of both layers gives you a floor count of AI sessions that is higher — often significantly higher — than what the GA4 interface reports. It’s not a complete count (sessions with zero referrer data and no source hints can’t be attributed deterministically), but it’s a more accurate floor than GA4’s AI Assistant channel.

GA4 UI vs BigQuery: What Each Shows

The same data, processed two different ways, produces dramatically different AI traffic numbers.

CapabilityGA4 InterfaceBigQuery Export
AI referrer detectionNative AI Assistant channel (May 2026+)Raw page_referrer + collected_traffic_source
Sessions with stripped referrerClassified as Direct — unrecoverableBehavioural pattern matching possible
Google AI Mode clicksHidden inside Organic Searchgoogle.com referrer visible in raw data
Attribution modelLast-non-direct (fixed)Any model — raw data supports custom logic
Data retention14 months maximumIndefinite (as long as tables exist)
SamplingApplied at high volumesNever — every event row preserved
AI traffic misattribution rate60-70% (Devimus, 2026)Reducible to 30-40% with pattern matching

The practical gap: GA4 misattributes 60-70% of AI search traffic to Direct or Referral by default, per Devimus client audits. BigQuery can’t eliminate all misattribution — sessions that genuinely carry no referrer data remain ambiguous — but it can recover sessions where the referrer was present but GA4’s classification discarded it, and it can probabilistically flag sessions whose engagement fingerprint matches AI-referred patterns.

GA4’s BigQuery export contains four competing traffic-source structures — each scoped differently and preserving different levels of raw referrer data that the UI discards during channel classification.

When There’s No Referrer: Behavioural Pattern Matching

For the 70.6% of AI sessions that arrive without any referrer, BigQuery enables forensic reconstruction using landing page depth, engagement signals, and timing correlations.

Referrer matching catches sessions where the data exists but GA4 misclassified it. Behavioural pattern matching addresses the harder problem — sessions where the referrer was genuinely stripped and no source data exists.

Landing page depth. Direct traffic from typed URLs concentrates on the homepage and short, memorable paths. AI-cited traffic lands on deep content pages — blog posts, specific product pages, long URLs that nobody types from memory. Query BigQuery for Direct sessions with landing page path depth greater than two levels and you have a candidate pool of misattributed traffic.

Engagement fingerprints. AI-referred visitors engage differently from accidental Direct visitors. AI-referred traffic converts at 10.21% versus 2.46% for non-AI — a 4.1x premium, per Loamly. In BigQuery, you can filter Direct sessions by engagement rate, session duration, and conversion events to isolate the high-intent segment that behaves like AI-referred traffic rather than typical Direct.

Timing correlation. Cross-reference Direct session spikes with your AI citation monitoring data. If Direct traffic to a specific page surges on the same day an AI platform begins citing that page, the correlation is strong evidence of misattributed AI traffic. BigQuery’s timestamp precision — microsecond-level event times — makes this correlation analysis possible.

This is probabilistic reconstruction, not deterministic attribution. It gives you a directional estimate of AI traffic volume that is more accurate than GA4’s native AI channel but less precise than server-side capture. The value is in moving from “we have no idea” to “we have a defensible range.”

You may be interested in: The 70% Problem: Your AI Traffic Is Hiding in GA4 Direct

The 14-Month Wall: Why BigQuery Is the Only Long-Term Option

GA4’s 14-month data retention limit means your AI traffic history disappears — BigQuery export is the only way to preserve it indefinitely.

GA4’s UI caps event-level data retention at a maximum of 14 months. The AI Assistant channel was introduced on May 13, 2026. Any AI traffic data collected before that date was classified as Referral or Direct — and once it ages past 14 months, it’s gone from the GA4 interface entirely.

BigQuery export data persists as long as the table exists. If you enabled the export before AI traffic started growing, you have a raw event history that can be retroactively queried for AI patterns that GA4 never classified correctly. Custom channel groupings in GA4 apply retroactively to existing data, but only within the retention window. BigQuery has no such window.

The catch: the export only captures data collected after you enable it. There is no historical backfill. If you haven’t enabled it yet, every day you wait is a day of raw AI traffic data you’ll never recover. Enabling the BigQuery export today is the cheapest insurance you can buy for your AI traffic measurement strategy.

What BigQuery Still Can’t Do

BigQuery recovers misclassified AI traffic and enables pattern matching — but it still operates on the same client-side data that missed the referrer in the first place.

BigQuery is powerful for AI traffic reconstruction, but it has boundaries.

It can’t create referrer data that never existed. When a mobile app strips the referrer during the app-to-browser handoff, that data is gone before GA4’s JavaScript fires. BigQuery receives the same empty referrer field. The behavioural pattern matching described above is a workaround, not a fix.

It can’t distinguish Google AI Mode from traditional organic. Both carry a google.com referrer. BigQuery preserves the raw referrer string, but google.com is google.com whether the click came from a blue link or an AI Mode summary. Separating them requires signals that exist at the HTTP request layer, not in GA4’s event stream.

It can’t detect zero-click AI citations. If a user sees your brand in an AI answer and doesn’t click through, no event is generated. BigQuery records events — no visit means no event means no data.

For the traffic BigQuery can’t recover, you need data captured before GA4’s JavaScript — at the HTTP request layer. Server-side event capture reads the full request headers, user agent, and landing URL at the server before any client-side stripping occurs. BigQuery is the best tool for working with GA4 data. Server-side capture is the tool for the data GA4 never sees.

70.6% of AI-referred traffic arrives without a referrer header and GA4 classifies it as Direct, but BigQuery enables behavioural pattern matching to probabilistically identify AI-driven sessions.

Key Takeaways

  • BigQuery preserves raw referrer data that GA4’s channel classification discards. The collected_traffic_source record and page_referrer parameter contain original source values before GA4 applies last-non-direct attribution and channel rules.
  • A SQL query against page_referrer and collected_traffic_source surfaces AI sessions GA4 misclassified. Filter for AI assistant domains to find sessions that GA4 routed to Direct, Referral, or Organic instead of AI.
  • Behavioural pattern matching extends detection beyond referrer data. Landing page depth, engagement fingerprints, and timing correlations can probabilistically identify AI-driven sessions even when the referrer is genuinely absent.
  • The 14-month retention limit makes BigQuery export essential. GA4’s AI Assistant channel has existed only since May 2026. Without BigQuery, your historical AI traffic data disappears as it ages past the retention window.
  • BigQuery operates on client-side data — it can’t recover what GA4 never saw. Mobile app handoffs, Google AI Mode clicks, and zero-click citations require server-side capture at the HTTP layer. Transmute Engine™ lands all events in BigQuery natively without requiring GA4 export.
Can BigQuery show AI traffic that GA4 hides?

Yes. BigQuery’s raw event export contains the collected_traffic_source record and page_referrer parameter with original referrer data that GA4 discards during channel classification. A SQL query filtering for AI assistant domains in these fields surfaces sessions the GA4 interface classified as Direct or Referral.

What BigQuery field contains the AI referrer data?

The page_referrer event parameter contains the full referring URL before GA4 applies channel rules. The collected_traffic_source record contains raw, unattributed source and medium values at the event level. Both preserve data that the GA4 UI overwrites with its last-non-direct attribution model.

How do I find AI traffic in BigQuery when there is no referrer at all?

Use behavioural pattern matching. Query for Direct sessions landing on deep content pages rather than the homepage, sessions with engagement metrics matching AI-referred benchmarks, and referrer-less sessions that spike in correlation with content you know AI assistants are citing. This is probabilistic reconstruction, not deterministic attribution.

Is the GA4 BigQuery export free?

Yes. BigQuery export is free to enable for standard GA4 properties. You pay only for BigQuery storage and query costs, which are minimal for typical analytics workloads. The export streams every raw event-level row without sampling or the 14-month retention limit that constrains the GA4 UI.

Why does BigQuery have data that the GA4 interface doesn’t show?

GA4’s interface applies channel classification rules, last-non-direct attribution, and data thresholding before displaying results. BigQuery receives the raw event data before these transformations. The page_referrer and collected_traffic_source fields contain original values that GA4’s classification pipeline overwrites or discards.

References

  • Loamly. “State of AI Traffic 2026.” 70.6% of AI traffic arrives as Direct. loamly.ai
  • Digital Applied. “GA4 BigQuery Export 2026: Marketing Analytics Reference.” May 2026. digitalapplied.com
  • Adswerve. “Four Different GA4 Traffic Flavors in the BigQuery Export.” 2025. adswerve.com
  • Devimus. “AI & ChatGPT Traffic in GA4: The 2026 Guide.” GA4 misattributes 60-70% of AI traffic. devimus.com
  • Insightland. “How to Track ChatGPT, Perplexity, and Gemini Traffic in GA4.” July 2026. insightland.org
  • Previsible / Search Engine Land. ChatGPT sends 92.4% of trackable AI referral traffic. searchengineland.com
  • Influencers Time. “GA4 AI Traffic Tagging.” Behavioural fingerprints for AI detection in BigQuery. influencers-time.com

BigQuery gives you the raw data GA4 processes away. But it still operates on client-side events — it can’t recover what GA4’s JavaScript never captured. Transmute Engine™ captures every HTTP request at the server layer and lands clean, classified events directly in BigQuery — no GA4 export required, no referrer stripping, no 14-month retention wall.