How to track AI search traffic in GA4

an analytics dashboard bar chart with one glowing highlighted bar labeled by a small AI chat icon, representing tracking AI referral traffic in analytics, minimal flat illustration

If you want to track AI search traffic in GA4, the first thing to know is that Google hides it from you by default. Visits from ChatGPT, Perplexity, Gemini, and Copilot do not get their own channel. They land in Referral, or worse, in Unassigned, mixed in with everything else. So most merchants look at their reports, see no obvious “AI” line, and conclude the channel is not sending them anything. It usually is. You just cannot see it.

And this is traffic you very much want to see, because it converts unlike anything else. Ahrefs found that AI assistants drove about 0.5 percent of site visitors but 12.1 percent of signups, which makes an AI-referred visitor roughly 23 times more likely to convert than the average one. Their conversion rates were 10.5 percent for Perplexity and 15.9 percent for ChatGPT, against 1.76 percent for Google organic. Small volume, enormous intent. Losing it in “Unassigned” is a real cost.

The fix is a ten-minute GA4 setup you do once. Here is the exact method, the regex to copy, and the honest limits of what GA4 can and cannot tell you about AI.

How do you track AI search traffic in GA4?

By default you cannot: GA4 buckets ChatGPT, Perplexity, Gemini, and Copilot visits into Referral or Unassigned. To see them as their own line, create a custom channel group in GA4 admin, add a channel called “AI Referrals” defined by a regex that matches those domains, and move it to the top of the rule order. From then on, AI traffic reports as its own channel.

Set up an AI Referrals channel, step by step

  1. In GA4, go to Admin, then, under Data display, Channel groups.
  2. Click Create new channel group, name it (for example “Default + AI”), and start from the default.
  3. Add a new channel called AI Referrals.
  4. Set its condition to Source matches regex, and paste the pattern below.
  5. Drag it to the top of the rule order. This matters: channels are evaluated top down, so if “Referral” sits above it, AI traffic gets claimed as Referral first and never reaches your new channel.
  6. Save. Reports using this channel group now show AI Referrals as its own line.

The regex to copy

Use the precise-domain version. It matches the eight biggest AI referrers and is less likely to catch false positives than a broad wildcard:

chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|chat\.openai\.com|bard\.google\.com|meta\.ai

If you would rather cast a wider net and catch subdomains and edge cases, the broader wildcard version works too, at the cost of the occasional false positive:

.*chatgpt.*|.*openai.*|.*perplexity.*|.*claude.*|.*gemini.*|.*copilot.*|.*edgeservices.*

Review the list every quarter. New assistants appear, and domains change (Google’s assistant moved from bard to gemini, for instance). A tracking setup you never revisit slowly goes stale. While you are tightening up attribution, our free UTM builder helps keep the links you control clean and consistent, so the traffic you can tag does not end up in Unassigned either.

Seeing historical AI traffic

Custom channel groups apply going forward in standard reports, but you do not have to wait to see the past. Build a Free-form Exploration, add Session source / medium as the dimension, and apply a filter where session source matches the same regex. That surfaces historical AI sessions right away, so you can size the channel before you have weeks of new data. It is also the cleanest place to compare AI conversion rates against your other channels.

What GA4 can’t tell you

Here is the ceiling on all of this, and it is important. GA4 only sees traffic that arrived. It measures the clicks an AI assistant sent you. It cannot measure the far larger number of times an assistant answered a shopping question and recommended a competitor instead of you, because that never became a session. Your best-converting channel is also your most invisible one at the top.

So GA4 answers “how much did AI send me”, but not “am I even in the answer”. Those are different questions with different tools. The downstream one you now have. For the upstream one, seeing whether AI assistants recommend your products at all, that is exactly what we are building Octolift to do: it monitors your visibility across assistants and flags the AEO gaps keeping you out of their answers. It is launching soon, and the waitlist is open, so drop your email and store URL to be first to see how your store scores.

Limitations to know

  • Some AI traffic has no referrer. Clicks from within an app, or where the referrer is stripped, show up as Direct. Your AI channel is a floor, not a full count.
  • AI Overviews are not referrals. When Google’s AI Overview cites you and the user clicks, that arrives as Google organic, not as an AI channel. It blends in.
  • Rule order is everything. If your AI channel is not at the top, a broader rule claims the traffic first. This is the single most common setup mistake.
  • Volume looks tiny, value is not. Do not dismiss the channel because it is 0.5 percent of sessions. Weight it by conversions, where it punches far above its size.

Getting the setup right is worth it precisely because the channel is small and mighty. If AI already sends the highest-intent traffic you have, the least you can do is stop losing it in Unassigned. And once you are ready to earn more of it, our guide to getting your products recommended by AI is the next step.

What to do with the data once you can see it

Naming the channel is step one. The point is what you do next.

  • Benchmark its conversion rate against your other channels in that same Exploration. When AI referrals convert at several times your site average, and they usually do, that is your argument for investing in the channel.
  • Watch the trend, not the snapshot. A single month tells you little. A rising line over three months tells you the channel is growing and worth budget.
  • Tie it to a conversion. Traffic without a goal event is a vanity line. Attach your signup or purchase event so you see revenue, not sessions.
  • Keep it in view. Add the AI Referrals channel as a comparison in the reports you actually open, so the number stays visible instead of buried in a custom group nobody checks.

Then treat the traffic number as a scoreboard for upstream work. If your AI referrals stay flat while the channel grows across the industry, the problem is usually not your GA4 setup. It is that assistants are not recommending you in the first place, which no amount of tracking will fix. Run our free AI readiness checker to see whether your store is even legible to them, and fix the basics before you expect the traffic line to climb. Measurement tells you where you stand. It does not move you up on its own.

Frequently asked questions

Does GA4 track ChatGPT traffic automatically?

No. By default GA4 files ChatGPT and other AI referrals under Referral or Unassigned, not a dedicated channel. You have to create a custom channel group with a regex that matches the AI domains to see it as its own line.

What is the regex to track AI traffic in GA4?

A clean precise version is: chatgpt.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com, chat.openai.com, bard.google.com, and meta.ai joined with the pipe character as a Source-matches-regex condition. Put the channel at the top of the rule order.

Why does AI traffic convert so much better?

Because an AI assistant has already done the filtering. By the time it sends a visitor, the person has a specific need and a recommendation they trust, so they arrive far closer to buying. Ahrefs measured AI-referred visitors converting roughly 23 times better than average.

Can I see past AI traffic before I set up the channel?

Yes. Custom channel groups apply going forward in standard reports, but a Free-form Exploration filtered by session source matching the AI regex shows historical sessions immediately, so you can size the channel without waiting for new data.

Does GA4 show whether AI recommends my products?

No. GA4 only measures traffic that arrived, so it shows the clicks AI sent you, not the times an assistant recommended a competitor instead. Measuring whether you appear in AI answers at all needs a dedicated visibility tool, not analytics.

Set the channel up once, put it at the top of the rule order, and check it monthly. The highest-intent traffic you have is worth naming, and worth watching.

Written by Ozkan Oz, founder at Craftshift, where we build Shopify apps and are building Octolift to help merchants get their products recommended by AI.

http://craftshift.com

Co-Founder @ Craftshift