quest_track_ai_traffic_ga4.exe
_
×

How to Track ChatGPT, Gemini & Claude Traffic in GA4 (2026 Guide)

GA4's native AI Assistant channel misses 35–70% of your AI sessions. Here's how to track AI traffic in GA4 (ChatGPT, Gemini, Claude) without losing data.

ga4 ai-traffic analytics seo guide

Since May 13, 2026, a new line has shown up in your acquisition reports: AI Assistant. Google finally added a native channel to GA4’s Default Channel Group to isolate visits coming from ChatGPT, Gemini, or Claude. Good news. The catch is that this native channel is badly incomplete: according to March 2026 measurements, between 35% and 70% of AI-driven sessions carry no referrer and keep landing in “Direct.” If you genuinely want to track AI traffic in GA4, the official channel is only a starting point. This guide covers all three layers of measurement, with a copy-paste regex.

What the native “AI Assistant” channel changes

The mechanism is simple: when GA4 detects a referrer matching a recognized AI assistant, it assigns the session the reserved medium ai-assistant, then files it under the AI Assistant channel in the Default Channel Group. The campaign dimension gets the reserved (ai-assistant) label.

In practice, you no longer need to hand-build a custom channel group to separate AI visits from other referrals… for the sources Google recognizes. But three limits matter:

  • No backfill. GA4 processes data “forward only.” Your AI traffic from before May 2026 stays in its original channel (Referral or Direct). Nothing is applied retroactively.
  • Partial coverage. The channel recognizes the major assistants (ChatGPT, Gemini, Claude, Copilot…), but Perplexity still lands in Referral, and Google’s AI Overviews are counted as Organic Search.
  • The “Direct” black hole. Most AI traffic sends no referrer at all (native apps, paid accounts that strip the referrer, links opened outside a browser). Those sessions escape the native channel entirely.

That last limit is the difference between rough reporting and real business steering.

Why the native channel isn’t enough: the “Direct” under-attribution

AI traffic isn’t a rounding error on a chart. It’s growing fast and, crucially, it converts: several 2026 studies show markedly higher engagement and conversion rates for assistant-referred visitors than for plain organic. Under-measuring this channel means wrongly attributing your best conversions to “Direct”, and missing an entire acquisition lever in your budget decisions.

But the HTTP referrer is increasingly scarce: per March 2026 data, 35% to 70% of AI-classified sessions arrive without a referrer and end up in “Direct.” On some sites, more than 70% of visits actually driven by an AI are invisible in the native channel. Until you go and recover that lost traffic, your reports will systematically understate AI and overstate Direct.

The fix is built in three layers, from simplest to most advanced.

Track AI traffic in GA4: the 3 measurement layers

Layer 1: a custom channel group with regex (10 minutes)

The native channel doesn’t cover Perplexity or several emerging assistants. Build your own channel group to take back control of the definition.

In GA4: Admin → Property data → Channel groups → Create custom channel group. Add a rule at the top of the list (order matters: the first rule that matches wins):

  • Channel name: AI / LLM
  • Condition: Source matches regex (below), OR Medium exactly matches ai-assistant (to also capture what Google already classifies).
chatgpt\.com|chat\.openai\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|bing\.com/chat|deepseek\.com|grok\.com|x\.ai|meta\.ai|poe\.com|you\.com|mistral\.ai

The custom channel group is also non-retroactive, but it enriches your reports immediately from its creation date. Keep the native channel running in parallel to compare coverage.

Also make sure none of these domains are being filtered out: check Admin → Data streams → Configure tag settings → List unwanted referrals so no assistant domain is excluded by mistake.

Layer 2: recover AI traffic lost to “Direct” server-side

This is where you tackle the real problem. When a session arrives without a referrer, you can sometimes catch it through a signal that does survive: a URL parameter. Some assistants append a utm_source or an identifiable fragment; you can also tag your own links shared in AI contexts.

The robust approach is to enrich the hit server-side, before it reaches GA4: inspect the referrer, URL parameters, and User-Agent, then force source / medium when you recognize an AI origin, including sessions that would otherwise fall into Direct. This logic lives in your GTM Server-Side container, not the browser, which makes it resistant to adblockers and ITP/ETP restrictions.

The full setup (Cloud Run, hit enrichment, first-party domain) is covered in the GTM Server-Side migration guide.

Layer 3: analyze AI traffic in BigQuery

The native channel tells you how much. BigQuery tells you what to do about it. With the raw GA4 export, you can segment conversions by AI source, cross-reference with landing pages, and measure the true value per assistant, without the sampling limits of standard reports.

-- Sessions and conversions by AI source (BigQuery, GA4 export)
SELECT
  traffic_source.source AS source,
  COUNT(DISTINCT CONCAT(user_pseudo_id,
    (SELECT value.int_value FROM UNNEST(event_params)
     WHERE key = 'ga_session_id'))) AS sessions,
  COUNTIF(event_name = 'purchase') AS conversions
FROM `your_project.analytics_XXXXXX.events_*`
WHERE REGEXP_CONTAINS(
  traffic_source.source,
  r'chatgpt|openai|perplexity|claude|gemini|copilot|deepseek|grok|meta\.ai'
)
GROUP BY source
ORDER BY sessions DESC

For export setup and querying best practices, see the GA4 BigQuery export guide.

Where to configure all this in GA4

Channel groups, unwanted referrals, and data retention all live in GA4’s Admin section. If you’re starting from a fresh property or your base setup is shaky, fix the foundations first with the set up GA4 from scratch guide. A clean channel group is useless if your conversion events aren’t firing correctly.

In summary

GA4’s native “AI Assistant” channel is a step forward, but it only measures a fraction of reality. To seriously track AI traffic in GA4:

  1. Pair the native channel with a regex channel group to cover Perplexity and emerging assistants.
  2. Recover traffic lost to Direct via server-side enrichment. That’s where most of the volume hides.
  3. Analyze in BigQuery to tie each AI source to real business value.

AI traffic is becoming an acquisition channel in its own right. The sites that measure it correctly today will make decisions on accurate numbers, while everyone else keeps crediting it to “Direct.”