Home / Blog / Track AI referral traffic
How-to

How to track AI referral traffic from ChatGPT, Perplexity and Gemini

People are arriving at your site from AI answers, and most analytics setups barely see it. GA4 finally has a native AI Assistants channel, which is a real step forward, but it misses Claude and Perplexity, ignores Google's own AI Overviews entirely, and lets a large share of genuine AI clicks slide into Direct. This is a practical guide to tracking AI referral traffic properly: what the native channel does and does not do, the exact referrer hostnames to match, a custom channel group to catch the rest, and where server logs pick up what GA4 drops.

[ AI REFERRAL TRACKING, 2026 ]GA4 now names AI traffic.It still misses a lot of it.+36.7%month-over-month rise in ChatGPT'sglobal referral share, April to May 2026SE Ranking, May 2026 (101,574 sites)Growing fast - and undercounted, because referrers get stripped.
SE Ranking (May 2026) found ChatGPT's global referral share rose from 0.23% in April to 0.32% in May 2026, a 36.7% month-over-month jump, across 101,574 websites. AI referral traffic is growing quickly, and still undercounted in analytics.

GA4 finally has a native AI channel, and it is worth turning to first

The most useful recent change is that Google Analytics 4 added a native AI Assistants default channel, which rolled out in mid-May 2026. In Google's own definition, it groups users who arrive from sources such as ChatGPT, Gemini, DeepSeek, Copilot or Grok, with the medium set to ai-assistant. For the first time, without any custom work, a slice of your AI-driven arrivals shows up under a label that says what it is, rather than being scattered across Referral. If you have not looked, open your reports and check whether the AI Assistants channel is populating. It is the fastest way to confirm that AI answers are already sending you people.

Two caveats matter from the start. The native channel is not retroactive, so it only classifies traffic from the rollout onward, and your history will not suddenly reorganise itself. And, as the next section explains, its source list is narrower than most people assume. It is a genuinely good default, but it is a floor to build on, not the whole picture. Take it as the starting point and then close the gaps deliberately.

What the native channel leaves out: Claude and Perplexity

This is the detail that trips people up, so it is worth stating plainly. Google's native AI Assistants list names ChatGPT, Gemini, DeepSeek, Copilot and Grok. It does not include Claude, and it does not include Perplexity. Two of the engines people most associate with AI answers are absent from the default channel, which means their referrals do not automatically appear under AI Assistants. Depending on how the click arrives, they surface as ordinary Referral traffic or fall into Direct instead.

So if you rely on the native channel alone and conclude that Claude and Perplexity are not sending you anyone, you are reading a gap in Google's list, not the reality of your traffic. To capture them you have to add them yourself through a custom channel group, which we get to below. Do not claim, and do not assume, that Claude and Perplexity are auto-captured, because on the current definition they are not.

"GA4's native AI channel names ChatGPT, Gemini, DeepSeek, Copilot and Grok, and quietly omits Claude and Perplexity. The default is a floor, not the full count."

Want to know whether AI engines are actually naming your brand, not just sending clicks? Get a free visibility audit and see how ChatGPT, Gemini and Perplexity describe you.

The AI Overviews blind spot you cannot fix with referrers

There is one gap no channel configuration can close. GA4's native AI Assistants channel explicitly excludes Google's own AI Overviews and AI Mode. Traffic from an AI Overview stays classified as Organic Search, and there is no referrer that sets it apart. A click from an AI Overview looks identical to a normal google / organic click, because it carries the same referrer, so you cannot separate it by source in GA4 at all.

This is not a bug you can regex your way around; it is how the referrer arrives. If a large share of your buyers are getting their answer inside Google's AI Overview and clicking through from there, that traffic is quietly folded into your existing Organic Search number. It is worth knowing so you do not go looking for an AI Overviews line that GA4 is never going to give you, and so you do not mistake it for a shortfall in AI traffic when it is really hiding in plain sight inside Organic.

The referrer hostnames that actually identify each engine

To build anything custom, you need the real referrer hostnames, not the brand names. When a referrer is present, these are the hosts each engine sends:

One warning that saves a lot of dirty data: match on these exact hostnames, and do not anchor on bare google.com, openai.com or anthropic.com. Those broader domains produce false positives, folding in ordinary Google search, OpenAI's marketing site or Anthropic's homepage rather than the answer surfaces you actually want to count. Precision here is what keeps your AI numbers trustworthy.

A custom GA4 channel group that catches the rest

To bring Claude, Perplexity and the others into one clean AI bucket, build a custom channel group in GA4 that matches the referrer hostname against a single regular expression. A recommended pattern is:

The anchors at each end, the leading caret and trailing dollar, matter as much as the list. They force an exact hostname match, which is precisely what stops bare google.com, openai.com or anthropic.com from leaking in. If you loosen the pattern to catch substrings, you reintroduce the false positives the previous section warned about. Add engines to this list as new ones appear, keep the anchoring, and you have a custom AI channel that covers what the native one omits.

Remember that this custom group and the native AI Assistants channel are answering slightly different questions, and neither one captures AI Overviews. Use the native channel as your quick default read, and the custom group when you want a complete, engine-by-engine view that includes Claude and Perplexity.

Why so much AI traffic still hides in Direct

Even with a perfect channel group, a substantial share of real AI clicks never carries a referrer at all, and those land in Direct. There are a few reasons this happens together. Mobile apps and in-app browsers frequently strip the referrer before the request reaches your site. AI browsers, such as ChatGPT Atlas, can do the same. And people constantly copy a link out of an answer and paste it into a fresh tab, which arrives with no source whatsoever. All of that traffic is genuinely from AI, and all of it looks like Direct.

How big is the leak? It is commonly estimated at somewhere around 30 to 50 percent of AI clicks, but treat that as a vendor estimate rather than an established fact, because it varies by audience, device mix and measurement method. The honest headline is the one to carry with you: AI traffic is systematically undercounted in GA4 because of this Direct inflation, and the native channel does not fix it and is not retroactive. Whatever number your AI channels show, the true figure is higher.

Where server and edge logs pick up what GA4 drops

The complement to GA4 is your own server or edge logs, and this is where you recover a lot of what analytics loses. Because logs record the raw Referer and User-Agent on every request, whether or not a JavaScript tag ever fires, they catch referrer-stripped human traffic that GA4 files under Direct, and they let you see requests that never register cleanly in analytics at all. Tools such as Cloudflare Workers or Logs make this practical to parse at the edge.

Logs do a second job that GA4 cannot. By reading the User-Agent, you can separate AI crawler bots from human referrals: GPTBot, PerplexityBot, ClaudeBot and OAI-SearchBot are the engines fetching your pages to build answers, not people clicking through. Knowing which is which tells you both how often the engines are indexing you and how often real humans arrive from an answer. Logs are not a replacement for GA4, they are the other half of the measurement, and used together they give a fuller picture than either alone.

A practical setup, in order

Putting it together, here is a sensible sequence that starts with the easy wins and closes the gaps from there.

The takeaway

Tracking AI referral traffic in 2026 is no longer guesswork, but it is not a single switch either. GA4's native AI Assistants channel gives you an honest baseline for ChatGPT, Gemini, DeepSeek, Copilot and Grok. A custom channel group with an anchored hostname regex brings in Claude and Perplexity. Server and edge logs recover the referrer-stripped clicks that hide in Direct and separate the crawlers from the humans. And through all of it, the honest caveat stands: AI traffic is systematically undercounted, Google's AI Overviews cannot be split out by referrer, and the native channel is not retroactive. Measure with those limits in view, and you will have a picture you can actually trust.

See whether AI names you, not just whether it sends clicks

Referral traffic tells you people arrived. It does not tell you whether ChatGPT, Gemini and Perplexity name and cite you for the questions your buyers ask. Stellarcast checks exactly that. Request a free audit.

Get your free visibility audit

Frequently asked questions

Does GA4 track ChatGPT traffic automatically now?

Partly. GA4 added a native AI Assistants default channel that rolled out in mid-May 2026, and it groups arrivals from sources such as ChatGPT, Gemini, DeepSeek, Copilot and Grok, with the medium set to ai-assistant. But Google's native list does not include Claude or Perplexity, so those still land in Referral or Direct unless you build a custom channel group to capture them. The native channel is also not retroactive, so it only classifies traffic from the rollout onward.

Why does so much AI traffic show as Direct?

Because the referrer is frequently stripped before it reaches your analytics. Mobile apps, in-app browsers and AI browsers such as ChatGPT Atlas often send no referrer, and users routinely copy and paste links out of an answer, which also arrives with no source. Those clicks fall into Direct rather than any AI channel. Vendors commonly estimate the undercounted share at somewhere around 30 to 50 percent, but treat that as an estimate rather than a settled figure. The practical consequence is that AI traffic is systematically undercounted in GA4.

Can I see Google AI Overviews traffic separately?

No. GA4's native AI Assistants channel explicitly excludes Google's own AI Overviews and AI Mode. A click from an AI Overview stays classified as Organic Search and looks identical to a normal google / organic click, because it carries the same referrer. There is no referrer that separates it, so you cannot isolate AI Overviews traffic in GA4 by source alone.

What referrer does ChatGPT send?

When a referrer is present, ChatGPT sends chatgpt.com, with the legacy chat.openai.com still appearing for some older paths. For reference, Gemini sends gemini.google.com (legacy bard.google.com), Claude sends claude.ai, Perplexity sends perplexity.ai or www.perplexity.ai, Copilot sends copilot.microsoft.com, DeepSeek sends deepseek.com and Grok sends grok.com or x.ai. Match on those exact hostnames, and do not anchor on bare google.com, openai.com or anthropic.com, which produce false positives.

How do I catch AI traffic GA4 misses?

Read your server or edge logs alongside GA4. Parsing the Referer and User-Agent from logs, for example with Cloudflare Workers or Logs, catches referrer-stripped human traffic that never registers cleanly in GA4, and it also lets you separate AI crawler bots such as GPTBot, PerplexityBot, ClaudeBot and OAI-SearchBot from genuine human referrals. Logs are the complement to GA4, not a replacement, and together they give a fuller picture than either alone.