Your AI traffic is hiding in Direct in GA4 — we covered why in the previous post in this series. Here we fix it for the part that does leave a trail: in about 15 minutes you'll have your own AI channel in Google Analytics 4 (GA4).

In the Searchability framework we work to get AI to discover and cite you. If you already measure your presence in model answers and checked how ready your site is with the AI Visibility Score, it's time to measure the visits that visibility drives. This is an executable how-to: you leave with the channel configured.

Before You Start: GA4's Native AI Assistant Channel

Google already did part of the work for you. Since May 2026, GA4 groups traffic from recognized assistants into a native "AI Assistant" channel inside the default channel group, with no setup on your side. According to Semrush, GA4 assigns those sessions the ai-assistant medium and groups them under that channel automatically as of May 13, 2026.

The problem is what it misses. That same analysis notes that Perplexity still lands in Referral and that most AI traffic arrives with no referrer and stays in Direct. And according to Google, organic search includes AI Overviews and AI Mode — because the click comes from google.com. The native channel captures what Google chooses to recognize — not what you want to measure.

That's why a broader custom channel is worth it. This isn't a technical whim: AI traffic converts differently. According to Similarweb, in ecommerce, visits referred by ChatGPT convert at 11.4%, versus 5.3% for organic search — measuring that channel well means measuring your highest-value traffic.

Subscribe to the Madbotz newsletter to get the next analysis straight to your inbox. No spam, no noise — just new posts.

Subscribe

How Each AI Source Shows Up in GA4

Before touching the configuration, it helps to know what each source does. Referrer stripping is uneven: some sources leave a trail and others erase it, so your custom channel can only capture the first kind. Apps with no referrer are a job for another layer — server-side measurement — which we'll cover in a later post.

Table 1 — how GA4 records each AI traffic source. The last column, "Action in your custom channel," is what you do with each case.

AI sourceHow it usually shows up in GA4Captured by the native "AI Assistant" channel?Action in your custom channel
ChatGPT (web)chatgpt.com / ai-assistant mediumYes (partly)Include chatgpt.com in the regex — reinforces and adds history
Perplexity (web)Referral perplexity.aiNoInclude perplexity.ai in the regex
Google Geminigemini.google.comYesInclude gemini.google.com in the regex
Claudeclaude.aiVariable — dropped from the published list in Jun 2026Include claude.ai in the regex
Microsoft Copilotcopilot.microsoft.comVariable — the native list changesInclude copilot.microsoft.com (not bing.com)
Google AI Overviews and AI ModeOrganic search (it's google.com)Not an assistantDon't include — segment within Organic
Assistants via app with no referrerDirect / (not set)No channel captures itServer-side measurement (later post)

The practical rule: include the hosts (domain names) of assistants that do pass a referrer, leave AI Overviews inside Organic, and reserve referrer-less apps for the server-side layer.

How to Build Your AI Channel in GA4 (Step by Step)

Four steps. The third is the one almost no one explains well, and the one that makes everything work.

Step 1: Create a Custom Channel Group

In GA4, go to Admin → Channel groups and create a new one. Don't edit the default: clone it and work on the copy, so you keep the original intact.

According to Google, a custom channel group defines how your traffic is classified through rules on dimensions like source and medium. Starting from a copy of the default gives you all the usual channels — Organic, Referral, Direct — and you only have to add yours.

Step 2: Add an AI Channel with a Source Regex

Create a new channel inside the group and name it "AI." The condition is: Source partially matches regex. Paste this regex into the value field:

chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|claude\.ai|copilot\.microsoft\.com|you\.com|poe\.com|grok\.com|deepseek\.com

The syntax is simple. The vertical bar | means "or," so the regex matches if the source is any of those hosts. The dot is escaped with \. so it means a literal dot and not "any character." Because you used "partially matches regex" — which works like a "contains" — you don't need anchors at the start or end.

One warning: don't put google.com or bing.com in this regex. You'd capture all of Google's and Bing's organic search, not just the assistants. That's why Copilot goes in as copilot.microsoft.com and AI Overviews stay out — they're google.com.

Step 3: Put the Rule in the Correct Order

This is the differentiator. The order of channels within the group is not cosmetic. According to Google, GA4 evaluates channels from top to bottom and assigns each session to the first channel whose conditions match — then stops checking.

If your AI channel sits below Referral, it never fires: Perplexity arrives as perplexity.ai, Referral catches it first, and your AI channel stays empty. The fix is to move the AI channel above Referral and Organic Search.

The recommended top-to-bottom order: your paid channels, then AI, then Organic Search, then Referral, and Direct last. The most specific rule — AI — goes before the general ones that could swallow it.

Step 4: Name, Save, and Validate

Save the channel group and select it in your acquisition reports. To confirm it works, open your site from an assistant and check the Realtime report, or use DebugView to watch the live session land in the "AI" channel.
Good news on history: according to Google, custom channel groups apply retroactively to historical and future data. Unlike the native channel, your custom channel reclassifies the AI traffic you already had recorded as Referral.

Keep the Regex Current

The regex isn't final — it's a living list. New assistants appear every few months and hosts change, so today's regex falls short in a quarter.

Even Google adjusts its own definition. According to Semrush, the list of assistants the native channel recognizes changed between launch and June 2026 — some sources were added and others dropped off. If Google moves the list, yours should move too.

Two habits help: review the regex every quarter, and keep your host list in a versioned file (in your repo or internal wiki, for example). When you spot a new assistant host in your source and medium reports, add it with a | and one more host.

What This Channel Doesn't Fix

Honesty before hype. This channel better classifies AI traffic that leaves a trail — the kind that arrives with a referrer or a UTM tag. It does not recover the kind that arrives with no referrer and lands in Direct through the referrer stripping we explained in the previous post.

And that referrer-less traffic isn't marginal. According to MarTech, a large share of AI traffic arrives with no referrer header and ends up mixed into Direct, where no source regex can rescue it. The channel helps classify what's measurable; it doesn't promise to give you back every lost session.

To recover what lands in Direct, you need another layer: server-side measurement and custom events. Those are the topic of the next posts in this series — here we just lay the foundation.

Book a call — if your AI tracking setup has edge cases (multi-domain, server-side, or regulatory requirements), book a call and we'll walk through it with you.

Frequently Asked Questions

Isn't GA4's native AI Assistant channel enough?

Not quite. It recognizes some assistants by their referrer, but it leaves Perplexity in Referral, counts AI Overviews as organic search, and is not retroactive. A custom channel is broader, you control it, and it does apply to past data.

Does this recover the AI traffic that lands in Direct?

No. The channel better classifies AI traffic that arrives with a referrer or a UTM tag; traffic that arrives with no referrer still lands in Direct. To recover that, you need server-side measurement and custom events, the topic of the next posts in this series.

How often should I update the regex?

Review it every quarter. New assistants appear and Google changes its own list of recognized sources, so keep your host list versioned and add any new assistant hosts you spot in your source and medium reports.

Does the custom channel affect past data?

Yes. According to Google, custom channel groups apply retroactively to historical and future data, unlike the native AI Assistant channel, which only counts traffic from May 2026 onward.

Wrapping Up

Madbotz does exactly this on its own blog: a custom AI channel above Referral, with a regex we keep current. We don't recover 100% of AI traffic — no one can, with the Direct layer — but we do classify what leaves a trail and report it as what it is.

Three takeaways:

  • The native "AI Assistant" channel is a good starting point, but a custom channel is broader, you control it, and it applies to past data.
  • Order rules: the AI channel must sit above Referral and Organic Search, or those rules swallow it.
  • The channel classifies AI traffic that leaves a trail; the kind that lands in Direct is recovered with server-side, the next layer in this pillar.

And remember the cause before the measurement: AI traffic is born from your visibility. Before fine-tuning the channel, make sure AI sees and cites you — you measure that with the AI Visibility Score, the same 130+ check-item engine we run on our own site.

🤖
Analyze your site for free — enter a URL and get your AI Visibility Score in under 60 seconds.