How to track ChatGPT and AI traffic in GA4
You cannot improve what you cannot see, and by default GA4 barely shows you your AI traffic. Worse, a big chunk of it is quietly mislabeled as 'Direct.' Here is how to build a channel that surfaces AI referrals from ChatGPT, Perplexity, Claude, Gemini and Copilot - and why even then the number is a floor.
Marketers keep asking "how much traffic are we getting from AI?" and then trusting whatever GA4 shows. The honest answer is: more than GA4 shows, and you have to set GA4 up correctly to see even that much. Both problems are fixable.
Step 1: build a custom AI channel group
GA4 does not, by default, group AI assistants into a clean channel you can watch. So make one:
- Go to Admin, then Channel groups, and create a new custom channel group.
- Add a channel called AI (or "AI Assistants").
- Set the rule to match Source matches regex, and use a pattern covering the major AI hosts:
Host-based: chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|meta\.ai
Many practitioners use a broader token pattern to catch variants and subdomains: .*chatgpt.*|.*openai.*|.*perplexity.*|.*claude.*|.*gemini.*|.*copilot.*.
Then move the AI rule to the top of the ordering so those sessions get claimed by your AI channel before another rule grabs them.
"By default GA4 barely shows your AI traffic - and a big chunk of it is mislabeled as Direct."
Step 2: understand the "Direct" undercount
Here is the catch that trips everyone up. Many AI clicks arrive with no referrer. Free-ChatGPT links and native-app clicks frequently pass no referring URL, so GA4 has nothing to attribute them to and files them under Direct. One 2026 analysis found about 36% of AI traffic arrived with no referrer.
The consequence: even a perfectly-built AI channel group shows you a floor, not the true total. A meaningful slice of your real AI traffic is sitting in Direct, indistinguishable from bookmarks and typed-in visits. Read your AI channel number as "at least this much," not "exactly this much."
Step 3: know about the native channel (and its limits)
Around 13 May 2026, Google added a native "AI Assistant" channel to GA4's default channel group. It helps, but it is not a complete fix: it rolled out gradually, it is not retroactive, and it does not cover every platform (Perplexity referrals, for instance). So keep your custom group - it applies to historical data and you control the coverage - and treat the native channel as a supplement, not a replacement.
What to do with the data
- Trend it, do not trust the absolute. Because of the Direct undercount, the direction and relative movement of your AI channel matter more than the exact number.
- Segment by engine. Break the AI channel into ChatGPT, Gemini, Perplexity and the rest, so you know which assistants actually send you people.
- Pair it with citation tracking. Referral traffic tells you who clicked through. It cannot tell you whether you were named in answers that never sent a click - which, as zero-click grows, is most of them. Measure citation directly too.
The takeaway
Two setup steps get you most of the way: build a custom AI channel group with the right regex, and remember that a big share of AI traffic hides in Direct with no referrer. Do both and you will see far more of your AI traffic than the default report shows - while remembering that clicks are only half the story, since the biggest AI exposure is being named in answers that never send a click at all.
See the whole AI picture, not just the clicks
GA4 undercounts AI traffic, and clicks miss whether you are cited at all. Stellarcast tracks whether you are named and cited across the major AI engines - the visibility GA4 can't show. Request a free audit and see where you stand.
Get your free visibility auditFrequently asked questions
How do I track ChatGPT and AI traffic in GA4?
Create a custom channel group in GA4 (Admin, then Channel groups), add an 'AI' channel, and match on source using a regex covering the AI hosts - chatgpt.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com, meta.ai (many use broader token patterns like chatgpt, openai, perplexity, claude, gemini, copilot). Move the rule to the top so it captures those sessions before other rules. As of 13 May 2026 GA4 also has a native 'AI Assistant' channel, but it is incomplete, so the custom group is still recommended.
Why does GA4 undercount AI traffic?
Because many AI clicks arrive with no referrer. Free-ChatGPT and native-app links often pass no referring URL, so GA4 buckets those sessions as 'Direct' instead of attributing them to AI. One 2026 analysis found about 36% of AI traffic arrived with no referrer. That means the AI number GA4 shows you is a floor, not the true total - your real AI traffic is higher than the channel report suggests.
Is the native GA4 AI Assistant channel enough?
Not on its own. Google added a native 'AI Assistant' channel to GA4's default channel group around 13 May 2026, which helps, but it rolled out gradually, is not retroactive, and does not cover every platform (Perplexity referrals, for example). The recommended approach is to build your own custom channel group anyway - it applies retroactively and you control the coverage - and treat the native channel as a supplement.
Related: How to measure your brand's visibility in AI answers →