See AI assistant traffic in GA4
Pick the AI assistants to count, copy a regex that matches their exact referrers and nothing else, and add it to GA4 as a channel or a segment, beside GA4's own AI Assistant channel.
Your regex
^(www\.)?(chatgpt\.com|chat\.openai\.com|gemini\.google\.com|copilot\.microsoft\.com|chat\.deepseek\.com|grok\.com|claude\.ai|perplexity\.ai|meta\.ai|chat\.mistral\.ai|you\.com)$
As a channel in your reports
- Admin, then Data display, then Channel groups.
- Copy the default channel group, or create a new one.
- Add a channel named “AI assistants” with the condition Source matches regex, and paste the regex.
- Move it above Referral, so these visits aren't claimed as referrals first, and save.
As a segment in an exploration
- Explore, then a blank exploration.
- Add a session segment with the condition Session source matches regex, and paste the regex.
- Compare it with all sessions on landing pages, engagement and conversions.
How to track AI traffic in GA4
- Pick the AI assistants to include. All of them is the usual choice; “Only those GA4 doesn't list” gives a regex that complements GA4's own channel.
- Copy the regex. It matches the session source, the hostname the visit came from, exactly.
- Add it to GA4 as a channel in a custom channel group, placed above Referral, or as a session segment in an exploration.
- Compare those visits with the rest: which pages they land on, how long they stay, whether they convert.
What this traffic does and doesn't show
AI referral visits are people who clicked a link in an answer. They are a small share of the answers that name you: most answers are read and never clicked, and Google's AI features send their clicks to Organic Search. So treat the segment as the visits side of AI visibility, not the whole of it.
How often answers name you is measured on the answers themselves, across many prompts and engines. The AI visibility ROI calculator puts the two together.
Questions
Doesn't GA4 already track AI traffic?
Partly. Since May 2026 GA4's default channel group has an AI Assistant channel, which Google describes as covering sources like ChatGPT, Gemini, DeepSeek, Copilot and Grok. Google doesn't publish the full list, so a custom channel or segment makes sure the assistants you care about, such as Claude or Perplexity, are counted the way you expect.
Why not use Google's example regex?
Google's help page suggests a regex that matches keywords like "gemini" or "gpt" anywhere in the source, which can catch unrelated sources. This one matches each assistant's exact hostnames, with or without www, and nothing else.
Are visits from AI Overviews and AI Mode included?
No. Google counts clicks from AI Overviews and AI Mode as Organic Search, and GA4 can't separate them. Search Console's generative AI performance report shows how often your pages appeared there.
Why do some AI visits show up as Direct?
When an assistant opens a link without passing a referrer or a UTM tag, GA4 has nothing to attribute the visit to and files it as Direct. No regex can recover those visits.
