Free Tool

GA4 AI traffic regex builder

Tick the AI assistants you want to track. Copy a GA4 regex and the settings for an "AI assistants" channel, then test it on your own source and referrer values. It all runs in your browser.

1. Pick the assistants

Every domain is tied to the vendor's own site or docs. The list below the tool shows where each one comes from.

2. Your regex

Source, matches regex

Paste it as the condition of a custom channel group. It also works as a Session source filter in explorations.

^((www\.)?(chatgpt\.com|perplexity\.ai|copilot\.com|grok\.com|meta\.ai)|chat\.openai\.com|claude\.ai|gemini\.google\.com|copilot\.cloud\.microsoft|copilot\.microsoft\.com|chat\.deepseek\.com|chat\.mistral\.ai)$

⁦210⁩ characters

3. Channel group settings

Google's steps for a custom channel group, in order.

  1. In GA4, open Admin. Under Data display, click Channel groups.
  2. Click Create new channel group. GA4 starts you from a copy of the default group. Give it a name, for example "Channels with AI assistants".
  3. Click Add new channel and name it "AI assistants".
  4. Click Add condition group. Pick Source, then matches regex, and paste the Source regex. Click Save channel.
  5. Click Reorder and drag "AI assistants" above Referral. If your copy has Google's own AI Assistant channel, drag yours above that too, or your list never gets the traffic it matches. Keep it below the paid channels, so ads tagged with an assistant as utm_source stay in paid. Click Apply.
  6. Click Save group. Then open Reports, Acquisition, Traffic acquisition and pick your group as the primary dimension.

4. Optional: filters in explorations and reports

Google says exploration filters are case sensitive. The regex is all lower case, so check that the values in your report are lower case too.

Session source, matches regex

^((www\.)?(chatgpt\.com|perplexity\.ai|copilot\.com|grok\.com|meta\.ai)|chat\.openai\.com|claude\.ai|gemini\.google\.com|copilot\.cloud\.microsoft|copilot\.microsoft\.com|chat\.deepseek\.com|chat\.mistral\.ai)$

⁦210⁩ characters

Page referrer, matches regex

^https?://((www\.)?(chatgpt\.com|perplexity\.ai|copilot\.com|grok\.com|meta\.ai)|chat\.openai\.com|claude\.ai|gemini\.google\.com|copilot\.cloud\.microsoft|copilot\.microsoft\.com|chat\.deepseek\.com|chat\.mistral\.ai)(/.*)?$

⁦225⁩ characters

5. Test your regex

A hostname is read as Source. A full URL is read as Page referrer. A link with utm_source is read as the Source GA4 takes from it. The whole value has to match, as in GA4, and case is ignored, as in channel groups. Up to ⁦200⁩ lines.

Paste values to see which ones match.

Your count is a floor

Some apps and in-app browsers send no referrer, and some links strip it. GA4 then has no clear source and logs the visit as (direct) / (none). Whatever this regex counts is the least AI traffic you got, never the total.

Next: see which AI answers name you

This regex counts the visits AI assistants send you. The AY Rank AI visibility checker in our app shows whether ChatGPT, Gemini, Perplexity, Claude and Google's AI answers name your brand at all.

Open the AI visibility checker
1

Tick the assistants

They all start ticked. Untick the ones you don't need.

2

Copy the regex

The builder escapes every dot and anchors the regex with ^ and $, so lookalikes such as notchatgpt.com do not match.

3

Add the channel

Follow six steps to put an "AI assistants" channel above Referral in a custom channel group.

4

Test it

Paste hostnames, referrer URLs or tagged links and see which match, with the full-match rule GA4 uses.

Clients ask us how to see ChatGPT traffic in GA4. GA4's default channel group now has an AI Assistant channel, but Google's help page does not list the referrers behind it. Your own channel uses a list you can read, change and test, and its Source rule also catches tagged links such as utm_source=chatgpt.com.

How GA4 matches a regex

  1. A GA4 regex has to match the whole value. Google's help page says: "By default, Google Analytics Regex is full regex and case sensitive. Partial regex requires the user to add metacharacters."
  2. Both regexes start with ^ and end with $. A full match and a partial match then give the same answer, so the same regex works in a channel group, a report filter or an exploration.
  3. Channel groups ignore case. Google says "Channel definitions aren't case sensitive." Exploration filters do not ignore case, since "the expression used is case sensitive." The regex is all lower case.
  4. A channel condition can use Campaign id, Campaign name, Default channel group, Manual ad content, Medium, Source or Source platform. Page referrer is not on that list, so the channel rule uses Source. Google's example of a Source value for a referring site is "facebook.com".
  5. utm_source fills Source, so a link tagged utm_source=chatgpt.com has chatgpt.com as Source. Google also says "Missing UTM parameters will result in (not set) values being present in reporting." A Source rule still catches those visits when the medium is (not set).
  6. Order decides. Google says "Traffic is included in the first channel whose definition it matches given the current order of channels in the group." For AI traffic it says to reorder the list so that "AI Assistants" appears above "Referrals".
  7. GA4's default channel group has an AI Assistant channel. Google says "The medium is set to 'ai-assistant' and the campaign is set to '(ai-assistant)' if the referrer matches a list of AI Assistants", and that the channel "excludes Google's AI Overviews and AI Mode." The help page does not list which referrers it checks.
  8. A standard property can have 2 custom channel groups and a 360 property 5, each with up to 50 channels.
  9. The Google pages we read state no length limit for a regex. The builder keeps it short and shows the character count. With all 9 assistants ticked, the Source regex is 210 characters.
  10. Google's own example regex on the custom channel group page uses broad patterns such as .*gpt.* and .*copilot.*. Even under a full match those match any source that contains those letters. This builder lists exact hostnames instead.

Where each domain comes from

Checked on 2026-11-11. Vendors move domains. Microsoft now redirects copilot.microsoft.com to copilot.com, and Mistral renamed Le Chat to Mistral Vibe. Refresh this list every few months.

Documented by the vendor The vendor names the domain in its own docs. The quote is under it.The vendor's app domain The product is served from this domain, linked from the vendor's site. It shows up as the referrer when the browser sends one.

Left out

  • You.com On 2026-11-11 the vendor's site described search and inference APIs. We found no consumer assistant on it to tie a referrer to.
  • Phind On 2026-11-11 the vendor's site answered with a bot check, so we could not tie a domain to its own pages.

Google Analytics sources

Read on 2026-11-11. The quotes on this page are copied from these pages.

Frequently Asked Questions

What does utm_source=chatgpt.com mean?

OpenAI adds it to links that ChatGPT sends people to. OpenAI's help center says "ChatGPT automatically includes the UTM parameter utm_source=chatgpt.com in referral URLs." GA4 reads utm_source as the Source, so these visits show chatgpt.com as Source even when the browser sends no referrer.

Doesn't GA4 already have an AI channel?

Yes. Google's help page lists an AI Assistant channel in the default channel group, for sources like ChatGPT, Gemini, DeepSeek, Copilot and Grok. It does not list the referrers behind it. Build your own channel when you want a list you can read, change and test.

Why is my AI traffic lower than I expected?

The count is a floor. Some apps and in-app browsers send no referrer, and some links strip it. Google says traffic without a clear referral source is logged as (direct) / (none), and that URL shorteners can strip referral details. A visit only reaches your AI channel when GA4 gets a referrer or a utm_source.

Can this track Google AI Overviews and AI Mode?

No. Google says its own AI Assistant channel "excludes Google's AI Overviews and AI Mode." This regex has no Google Search domain in it, so it does not count those clicks either.

Why does the channel rule use Source and not Page referrer?

Google lists the fields a channel condition can use: Campaign id, Campaign name, Default channel group, Manual ad content, Medium, Source and Source platform. Page referrer is not one of them. Use the Page referrer regex in explorations instead.

Does the new channel show past data?

Yes. Google says "Custom channel groups can be applied to your reports retroactively."

Want us to fix this for you?

We set up AI traffic tracking in GA4 and work on getting your brand named in AI answers, so your AI assistants channel has visits to count.