GA4 AI Traffic Regex Generator
Build the regex that groups ChatGPT, Perplexity, Gemini and other AI assistants into their own GA4 channel.
Your details
Your regex for the GA4 session source condition
.*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|copilot\.com|claude\.ai|deepseek\.com|meta\.ai|grok\.com|mistral\.ai|you\.com|poe\.com|phind\.com).*In GA4 go to Admin → Data display → Channel groups → Create new channel group. Add a channel named “AI assistants” with the condition Session source · matches regex · this pattern. Drag it above Referral so these visits aren't counted as referrals, then save.
211 characters, covering 12 assistants. The leading and trailing .* make it work whether a field matches the whole value or part of it.
Google's AI Overviews and AI Mode send visitors as ordinary Google organic traffic, so no regex can separate them. Some assistant apps also strip the referrer, which lands those visits in Direct.
Why AI traffic needs its own channel
Shoppers increasingly ask ChatGPT, Perplexity or Gemini what to buy and click through to the stores they recommend. Unless you set up a custom channel group, GA4 files most of these visits under Referral, mixed in with blogs and directories, or under Direct when the app strips the referrer.
A custom channel pulls them out so you can see how much revenue AI assistants send and which pages they land on.
Setting up an AI assistants channel
- 01
Create a channel group
In GA4 go to Admin → Data display → Channel groups and create a new group. Start by copying the default group so everything else stays the same.
- 02
Add the channel
Add a channel called AI assistants with one condition: Session source matches regex, then paste the pattern above.
- 03
Put it above Referral
Channels are matched in order, top first. Drag AI assistants above Referral, otherwise those visits are claimed by Referral first.
- 04
Use it in reports
Choose your new channel group as the primary dimension in Traffic acquisition. Custom channel groups also apply to past data.
What the regex can't see
- Google AI Overviews and AI Mode send visitors as normal Google organic traffic. There's no separate source to match.
- Apps that strip referrers show up as Direct. Some assistants add
utm_sourcetags to links, which fixes this when present. - New assistants won't be counted until you add them. Revisit the list every few months.
Questions people ask
Why does the pattern start and end with .*?
Some GA4 fields match the whole value and some match part of it. Wrapping the list in .* makes the same pattern work in both.
Does it capture Google's AI Overviews?
No. Those clicks arrive as google / organic and can't be separated from normal search traffic.
Will it change my existing reports?
No. A custom channel group sits alongside the default one. Your existing reports keep using the default until you switch.
Can I add an assistant that isn't listed?
Yes. Add its domain inside the brackets with a pipe, escaping the dot: for example |newassistant\.com.
Related tools
Last reviewed 29 September 2026.
