GA4 setup
Track AI assistant traffic in GA4
GA4 has an AI Assistant channel: a release note dated 13 May 2026 describes it, with medium ai-assistant and campaign (ai-assistant). The note names ChatGPT, Gemini and Claude; Search Engine Journal reports a different list in later documentation, without Perplexity. A custom channel group with a regex tells you exactly which hostnames you count.
Last checked · How we check
On this page
Copy the filter for GA4
Hostnames
Only hostnames with a test or a vendor source.
UTM variants
For hand-made tags such as utm_source=chatgpt.
9 values for ga4.
copilot\.microsoft\.com|chat\.deepseek\.com|gemini\.google\.com|chat\.mistral\.ai|perplexity\.ai|chatgpt\.com|www\.meta\.ai|grok\.x\.com|claude\.ai
Paste into a custom channel group or an Explorations filter on Session source.
Checked locally in your browser against the pattern above.
Syntax partly documented9 values
- GA4 compares the whole value and is case-sensitive by default, so the pattern needs no anchors and the hostnames are written in lower case.
- The pattern uses only literals, escaped dots and alternation, which every RE2-style engine accepts. Do not add lookahead or backreferences: RE2 does not support them.
- Place the channel above Referral: traffic goes to the first channel whose rule it matches.
- The list holds exact hostnames. A www. variant (for example www.chatgpt.com) is recognised by the referrer checker but is not in this pattern; add it if your reports show it.
Built from the referrer list (checked ). Settings are not saved; the page works offline once loaded.
What GA4 counts natively
The release note "New AI Assistant traffic measurement" (13 May 2026) adds an AI Assistant channel to the default channel group. Traffic is assigned medium ai-assistant when the referrer matches a recognised assistant, and the campaign is shown as (ai-assistant). The note names ChatGPT, Gemini and Claude as examples. Search Engine Journal reports that the rollout was gradual until early June and that Google's documentation later lists a partly different set.
| Assistant | Release note, 13 May 2026 | SEJ's account of the later documentation | In our strict regex |
|---|---|---|---|
| ChatGPT | Named | Named | chatgpt.com |
| Gemini | Named | Named | gemini.google.com |
| Claude | Named | Not in the list | claude.ai |
| Microsoft Copilot | Not named | Named | copilot.microsoft.com |
| Grok | Not named | Named | grok.x.com |
| DeepSeek | Not named | Named | No (hostname unverified) |
| Perplexity | Not named | Not in the list | perplexity.ai |
| Meta AI and Le Chat | Not named | Not mentioned | www.meta.ai, chat.mistral.ai |
We have not tested this in our own GA4 property, so we cannot tell which source is right. Until then, the honest reading is: ChatGPT and Gemini are in both; Claude, Copilot, Grok and DeepSeek are in one; Perplexity is in neither. Check your own property by opening the AI Assistant channel and listing its sources.
Build a custom channel group
A custom channel group lets you decide the list yourself instead of relying on the default. Google's help page on custom channel groups documents conditions of the type "matches regex", and that traffic goes into the first channel whose definition it matches, in the order of the group.
- Pick your assistants and strictness in the generator above and copy the regex.
- Create a custom channel group in your GA4 property and add a channel, for example "AI assistants (custom)".
- Give the channel one condition: Source, matches regex, and paste the pattern.
- Drag the channel above Referral. Otherwise the visits are claimed by Referral first.
- Save, then compare the new channel with Direct and Referral over a few weeks.
Regex rules that matter in GA4
- Google's help page says a GA4 regex is a full match by default and case-sensitive. The pattern therefore needs no anchors, and the hostnames are lower case.
- Escape dots (
chatgpt\.com). An unescaped dot matches any character. - The generator output uses only literals, escaped dots and
|. Google's other products document RE2 for such fields, which has no lookahead and no backreferences; the GA4 page we read does not name the engine, so keep patterns this simple. - Strict mode lists only hostnames with a test or a vendor source. Broad mode adds hostnames from third-party lists that we could not verify.
What this does not catch
- Visits without a referrer and without a utm tag stay in Direct. See why AI clicks end up as Direct.
- Google AI Overviews and AI Mode clicks are counted as organic search according to SEJ; Google's documentation counts them under Web in Search Console and says nothing about referrers. They cannot be separated by hostname here.
- Hostnames that are not on the referrer list yet. New assistants and new hostnames appear; the list carries a check date for that reason.
- Behaviour that changed after the data we cite. In October 2026 ChatGPT traffic dropped in GA4 reports; see the incident page.
Check that it works
A filter is only as good as a real click. Open the assistant you care about, ask a question that makes it cite your page, click the link and look for the visit under Source in a realtime view. If the source shows the hostname you expected, the pattern matches. If the visit appears under Direct, the assistant sent neither a referrer nor a tag on that surface; try the referrer checker with what you do see.
Paste a source value into the test field of the generator to see whether your regex matches it before you save it in GA4.
Follow-up questions
Does GA4's AI Assistant channel include Perplexity?
The release note does not name it and SEJ says the later list does not include it. Plausible, Matomo and PostHog name Perplexity. Check the sources inside the channel in your property, or add perplexity.ai with a custom channel group.
Do AI Overviews show up as AI Assistant?
SEJ reports that AI Overviews and AI Mode count as organic search. Google's documentation says traffic from AI features is counted under Web in Search Console. Neither describes a referrer you could filter on.
Why do some AI visits stay in Direct?
Because some surfaces send no referrer and the link carries no tag. The mechanisms are on the Direct page.
Sources
Read on . Links lead to the original pages.