TL;DR
- GA4 doesn't have a native "AI" channel, so ChatGPT, Perplexity, Claude, and similar assistants get bucketed into Referral or Direct.
- The fastest read is a regex filter on Session source / Page referrer in the Traffic Acquisition report or a Free-Form Exploration.
- For durable reporting, build a Custom Channel Group with an "AI" rule placed above Referral — it applies retroactively.
- Create an "LLM Users" audience so the cohort can be analyzed and compared over time.
- Google AI Overviews and AI Mode still report as organic Google; you cannot fully isolate them and have to triangulate via Search Console.
AI assistants now send measurable referral traffic, but GA4's default channel grouping was built before ChatGPT existed. Most sessions originating in an LLM either land as chatgpt.com / referral (good), Direct (when users copy-paste URLs out of a chat), or get misclassified into Referral with no easy way to slice them. The fix is a three-layer setup: a quick regex for ad-hoc analysis, a Custom Channel Group for ongoing reporting, and an Audience for cohort work.
Step 1: Run a regex filter for a quick read
Start in Reports → Acquisition → Traffic acquisition. Add a filter on Session source / medium (or Session source) and switch the match type to matches regex.
A practical pattern covering the major assistants, adapted from Analytics Mania and Discovered Labs:
chatgpt\.com|chat\.openai\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|meta\.ai|deepseek\.com|grok|mistral\.ai|writesonic\.com
If you're working inside a Free-Form Exploration and filtering on Page referrer instead of source, use an anchored variant — Orbit Media's guide recommends matching the full URL so partial strings don't generate false positives:
^https:\/\/(www\.meta\.ai|www\.perplexity\.ai|chat\.openai\.com|claude\.ai|chat\.mistral\.ai|gemini\.google\.com|bard\.google\.com|chatgpt\.com|copilot\.microsoft\.com)(\/.*)?$
This gets you a number today, but it doesn't persist. Anyone opening the report has to re-apply the filter. That's what the next step solves.
Step 2: Build a Custom Channel Group for permanent reporting
GA4 allows up to two custom channel groups per property. Use one for AI.
- Go to Admin → Data display → Channel groups → Create new channel group.
- Name it something like "Default channels + AI".
- Add a new channel called AI Assistants at the top of the rule list — order matters, because GA4 evaluates rules sequentially and Referral will otherwise swallow these sessions.
- Define the rule as Source matches regex using the pattern from Step 1.
- Save. The grouping applies retroactively to historical data, which Discovered Labs confirms is one of the few retroactive features in GA4.
After the group is live, switch any report's primary dimension to your new channel group and AI will show up as its own row alongside Organic Search, Direct, Referral, and the rest. Roar Digital notes that Google quietly added an AI-assistant regex example to its own GA4 documentation in July 2025, which is a useful tell that this is now a standard pattern rather than a hack.
Step 3: Create an "LLM Users" audience
Channel groups slice reports. Audiences let you treat AI visitors as a cohort — useful for funnel analysis, comparison segments, and remarketing.
In Admin → Audiences → New audience → Create a custom audience, add a condition on Session source matches regex, using a permissive pattern like the one The SEO Works suggests:
.*bard.*|.*chatgpt.*|.*openai.*|.*claude.*|.*copilot.*|.*gemini.*|.*perplexity.*|.*meta\.ai.*|.*mistral.*
Set membership duration to the maximum (typically 540 days) and save. Audiences are not retroactive — they start accumulating users from the moment you create them, so set this up before you need it. Once populated, you can use the audience as a comparison in any standard report, push it to Google Ads, or analyze conversion rate versus Organic.
Step 4: Handle dark AI traffic and AI Overviews
Two leaks remain after the setup above.
Dark AI traffic. When a user copies a URL out of ChatGPT and pastes it into a new tab, the referrer is stripped and the session lands as Direct. You can't recover the source server-side, but you can approximate it by tagging links you control with UTMs (utm_source=chatgpt&utm_medium=ai_assistant) wherever you syndicate to AI-readable surfaces, and by watching Direct landing pages that have no business receiving direct traffic (deep blog URLs, long-tail product pages).
AI Overviews and Google AI Mode. Clicks from these surfaces still report as google / organic — Orbit Media flags this as an unresolved gap. Triangulation is the only option: compare week-over-week Direct and Organic landing-page trends against Search Console impressions for the same URLs. A pattern of rising impressions, falling CTR, and rising Direct on the same pages is the signature Roar Digital describes.
Step 5: Validate the setup
Before trusting the numbers, run two sanity checks:
- In an Exploration, cross-tab your new AI channel against Page referrer. Every row should be an AI domain. If you see stray referrers, tighten the regex.
- Compare AI sessions to the equivalent Page referrer contains filter. Large gaps usually mean source/medium has been overwritten by a UTM somewhere upstream.
Keep the regex in a shared doc. New assistants appear quarterly (DeepSeek, Grok, Le Chat) and the pattern needs maintenance — treat it the same way you treat a bot filter list.
FAQ
Why does ChatGPT traffic show up as Direct in GA4?
ChatGPT's web app sometimes opens outbound links in a way that strips the referrer, and users often copy URLs into a new tab. Both cases land in GA4 as Direct because no referrer header reaches your server.
Are custom channel groups retroactive?
Yes. Unlike audiences, GA4 applies channel group rules to historical data, so a new "AI Assistants" channel will repopulate past months once you save it.
Can I separate Google AI Overviews from regular organic search?
Not reliably inside GA4. AI Overview clicks carry the same google / organic source/medium as standard SERP clicks. The workaround is comparing Search Console impression and CTR shifts against GA4 landing-page Direct and Organic trends.
Sources
- Analytics Mania — AI traffic in Google Analytics 4
- Discovered Labs — Track ChatGPT, Perplexity and AI Overviews traffic in GA4
- Orbit Media — How to track AI traffic in GA4
- Roar Digital — How to track AI referral traffic in Google Analytics
- The SEO Works — How to track ChatGPT traffic in Google Analytics 4

