Home / Blog / Track AI traffic in GA4
How-to

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

[ MEASURE THE AI CHANNEL ] Your AI traffic is hiding in Direct. 36%of AI traffic arrived withno referrer - miscountedClickport, Apr 2026 Build a custom GA4 channel so it stops undercounting
~36% of AI traffic arrives with no referrer, so GA4 files it under Direct and undercounts it.

GA4 does not, by default, group AI assistants into a clean channel you can watch. So make one:

  1. Go to Admin, then Channel groups, and create a new custom channel group.
  2. Add a channel called AI (or "AI Assistants").
  3. 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."

Curious how AI engines describe your brand right now? Get a free visibility audit and see where you stand across ChatGPT, Gemini and Perplexity.

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

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.

Common mistakes that quietly break the setup

Most broken AI channels are not broken by a bad regex. They are broken by small ordering and scoping mistakes that GA4 never warns you about. If your AI number looks suspiciously flat or large, start here before touching the pattern.

None of these throw an error. They just hand you a plausible number that is wrong - the most expensive kind of mistake in a report your team acts on.

A worked example: reading the report honestly

Say your custom AI channel shows 1,200 sessions last month, and Direct shows 40,000. The naive read is "AI is a rounding error, ignore it." That read is almost certainly wrong, and here is how to pressure-test it without pretending you have numbers you do not.

Start with the shape of Direct. A healthy site with steady branded search should have a fairly stable Direct channel. If Direct has climbed month over month while your obvious campaigns have not, some of that climb is very likely referrer-less AI traffic that GA4 could not label. You will not get an exact figure, but you can see the drift, and the drift is the signal.

Next, look at what those Direct sessions do. Filter Direct to landing pages that are deep and unlikely to be bookmarked - a comparison page, a pricing breakdown, a long guide. Bookmark and typed-in traffic clusters on the homepage and a few shallow pages. A stranger landing cold on your "X versus Y" page with no referrer looks a lot more like someone who just asked an assistant which tool to pick.

"The AI number GA4 hands you is a floor. The interesting question is how far above the floor you actually are."

The point is not a precise second number. It is to stop treating the AI channel figure as the ceiling. Once you read it as a floor and check Direct for corroborating shape, you make far better calls about where AI sits in your mix.

Why clicks are the smaller half of the story

Even a flawless GA4 setup only ever measures the people who clicked. That was a reasonable proxy in the search era, when ranking well and getting the click were nearly the same event. In AI answers they are not. The assistant reads your page, synthesises an answer, and often resolves the user's question inside the chat. The user never arrives, so GA4 never sees them, no matter how good your channel group is.

This blind spot grows as more queries end in an answer instead of a link. If your brand is named, summarised and recommended inside the response, that is a real marketing outcome with zero sessions attached to it. Conversely, you can win the click war on the small slice that clicks through and still be invisible in the answers that shape the buying decision.

So treat GA4 as one instrument, not the whole dashboard. It tells you who the AI channel sent to your door. It cannot tell you whether the assistant named you, cited you, or recommended a competitor while your page sat unread in its context window. Measuring that means watching the answers themselves - visibility a referral report was never built to give you.

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 audit

Frequently 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.