GA4 AI Traffic Regex Generator

Build the regex that groups ChatGPT, Perplexity, Gemini and other AI assistants into their own GA4 channel.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Your details

AI assistants to include
Where you'll use it

Your regex for the GA4 session source condition

regex
.*(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

  1. 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.

  2. 02

    Add the channel

    Add a channel called AI assistants with one condition: Session source matches regex, then paste the pattern above.

  3. 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.

  4. 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_source tags 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.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com

Last reviewed 29 September 2026.