Guide
The GA4 AI Channel Group Regex, From Our Production Referrer List
The short answer
What regex do I use for a GA4 AI-traffic channel group?
Use chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|you\.com|poe\.com — 9 escaped hostnames joined by alternation — as a source-matches-regex condition in a GA4 custom channel group ordered above Referral. The hostname set mirrors the AI-referral matcher live in our production tagging since 2026-08-12 [our data]; in production we consume it as a tagged event, and the channel group is the no-code reporting version. Review your referral report monthly before appending hostnames.
This page is the copy-paste reference for the channel-group version of one production asset: the AI-referrer hostname list in our tagging code, live on our insurance build since 2026-08-12 [our data]. One scope note up front, because precision about our own instruments is the point of this site: in production we consume that list as a first-pageview tagged event, not as a channel group — the channel group below is the no-code translation of the same matcher, and the one real difference between the two installs is covered further down. The full setup walkthrough lives in how to track ChatGPT traffic in GA4; this page is the pattern itself, what it matches, what it misses, and the rule for keeping it current.
The pattern, as one line:
chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|you\.com|poe\.com
What does each part of the regex match?
Nine referrer hostnames, one per assistant surface, joined by the pipe character — regex alternation, meaning "any of these." Every dot is escaped with a backslash because an unescaped dot is a wildcard in regex; chatgpt\.com matches the literal hostname and nothing else.
| Fragment | Assistant | Note |
|---|---|---|
chatgpt\.com | ChatGPT | Primary ChatGPT domain |
chat\.openai\.com | ChatGPT | Legacy domain, still appears in referral data |
perplexity\.ai | Perplexity | Also covers www-subdomain referrals |
claude\.ai | Claude | Anthropic's assistant |
gemini\.google\.com | Gemini | Distinct hostname from google.com organic |
bard\.google\.com | Gemini | Bard-era predecessor domain, legacy referrals |
copilot\.microsoft\.com | Copilot | Distinct hostname from bing.com organic |
you\.com | You.com | Assistant-style search product |
poe\.com | Poe | Quora's multi-model assistant |
The condition it plugs into is source matches regex, on a custom channel in a copy of the default channel group. Matching on source hostname is the load-bearing choice: hostnames survive changes to landing pages, campaign tags, and paths, so the pattern does not rot when an assistant changes how it links.
How wide should the hostname list be?
As wide as you can keep accountable. Semrush's published GA4 method takes the same hostname-matching approach (Semrush, 2025); set against the 9-hostname list above, its one addition is search.brave.com. Our own production matcher went wide from day one — you.com and poe.com are in it [our data] — because width in a matcher is nearly free. What is not free is an unaccountable list: every hostname you add is a line you now own, so append against your own referral report and date each change rather than pasting an ever-longer pattern you never verify.
The one referrer width cannot buy in a channel group: bing.com/chat, Copilot's other front door. A channel condition matches on source, which carries only the hostname — bing.com — and matching that would misfile Bing organic search wholesale. Our production instrumentation catches it anyway because it is an event matcher reading the full referrer URL [our data]; that gap is the honest reason to consider event tagging alongside the channel group, and both installs are laid out in the walkthrough.
How do you install the regex in GA4?
Six steps, all in the GA4 admin — about 20 minutes, no code changes on the site:
- Copy the pattern above.
- Copy the default channel group (Admin → Data display → Channel groups). Custom channels only exist on copies.
- Add a channel named AI Assistants with one condition: source matches regex, and paste the pattern.
- Drag it above Referral. GA4 assigns each session to the first channel whose condition matches, so ordering is not cosmetic — below Referral, the channel receives nothing.
- Verify. In Traffic acquisition, the new channel's totals should reconcile with a session source filter for the same hostnames.
- Annotate the go-live date, so trend charts have an honest starting line.
The most likely failure is step 4: a correctly written regex on a channel that sits below Referral, reading zero forever.
What will this regex never catch?
Three whole categories, and knowing them is the difference between reading the channel and over-reading it.
Bot fetches. GPTBot crawling for training, or ChatGPT-User fetching a page live during a conversation, never executes JavaScript, never fires the GA4 tag, and never appears in any channel — OpenAI documents these as automated agents (OpenAI bot documentation). That traffic is real and large, and it lives in your server logs; the complete AI crawler list covers how to read it there.
Referrer-less arrivals. A visit that arrives without a referrer header — an answer copied into another app, some in-app browsers — lands in Direct, and no reporting-layer regex can recover it. The channel is a floor on AI-assistant traffic, not a ceiling.
Citations nobody clicks. The far larger number of times an assistant cites or mentions you without a click never touches GA4 at all. That side is measured by direct observation — the free share-of-voice method — and the honest position is that the GA4 channel is the smallest of the instruments, not the main one.
How do you maintain the pattern?
One rule, applied monthly: sweep the referral report for assistant hostnames the pattern misses, append only what your own data shows, and date every change. In practice that is a 5-minute pass — sort Traffic acquisition by session source, scan for assistant-product hostnames outside the current list, and if one has real sessions, escape its dots and add it with a pipe.
Two disciplines keep the asset trustworthy. Keep the canonical pattern in version control or a dated document, not only inside the GA4 interface, so you can say exactly what the channel matched in any given month — ours lives in the tagging code of the build itself [our data]. And annotate every change in GA4, because a pattern edit changes what the channel counts going forward, and an undated change quietly poisons every trend line that crosses it.
New assistant products are the reason the rule exists. The 9-hostname list mirrors our production matcher as of August 2026 [our data]; it will not be current forever, and a regex nobody reviews becomes a slow leak back into generic Referral — the exact problem the pattern was built to fix.
What is this measurement actually for?
Scoping the AI-referral question with real numbers instead of vendor ones — and on our build the early answer is "small." AI-assistant referral volume on the insurance build is a thin slice next to organic search in the early tagged data [our data], consistent with the click behavior in the published research. We deliberately publish no conversion-quality numbers from it yet; the instrumentation is weeks old, and days of separated data cannot carry a finding.
Against interest: if you are hoping this channel will justify an AI-visibility budget, it probably will not — the sessions are too few on most sites, ours included so far. Its value is honesty: a measured floor for the one AI metric everyone else estimates, sitting alongside the rest of the measurement stack in our generative engine optimization guide.
Frequently asked questions
What regex matches AI assistant traffic in GA4?
A 9-hostname pattern: chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|you\.com|poe\.com — applied as a source-matches-regex condition on a custom AI Assistants channel ordered above Referral. The hostname set mirrors the AI-referral matcher live in our production tagging since 2026-08-12 [our data].
Why do the dots need escaping in the GA4 regex?
Because an unescaped dot is a regex wildcard matching any character, so chatgpt.com would also match unrelated strings that happen to fit the pattern. Escaping as chatgpt\.com pins the match to the literal hostname. Across 9 alternatives the discipline costs a handful of backslashes.
Should I add search.brave.com to the regex?
Semrush's published pattern includes it, and width costs nothing in accuracy. Our own production matcher casts wide from the start — you.com and poe.com are in it [our data] — but every line should stay accountable: append a hostname when your referral report shows it, and date the change.
Why does my AI channel show zero sessions?
Almost always ordering. GA4 evaluates channels top to bottom and assigns each session to the first match, so an AI channel sitting below Referral never receives anything. Drag it above Referral, then re-check against a session-source filter for the same hostnames.
Why does your production setup tag events instead of using a channel group?
Because an event matcher reads the full referrer URL, so it can catch paths like bing.com/chat — Copilot's other front door — which a source-scoped channel condition cannot see without swallowing Bing organic [our data]. The channel group is the no-code version of the same list; the event is the wider net.
Does this regex capture GPTBot and other AI crawlers?
No. Crawlers and fetchers like GPTBot do not execute JavaScript, so they never fire the GA4 tag and never appear in any channel — OpenAI documents its bots as automated agents, visible in server logs instead. The regex measures 1 thing: humans clicking through from assistant products.
Sources
- Tracking AI Traffic in Google Analytics — Semrush
- OpenAI crawlers and bots — OpenAI