Free GEO measurement toolGA4 AI traffic regex generator: track ChatGPT, Perplexity and Claude.
Tick the AI assistants you care about and get a tested regex for a GA4 custom channel group, plus a Looker Studio formula and a GTM variable. The source list is maintained and dated, because static regexes break when assistants change domains.
Free · no signup · updated 5 October 2026
Pick your AI sources
List last reviewed 2026-10-05.
1. Regex for GA4
2. Create the channel group
- In GA4 go to Admin → Data display → Channel groups and click Create new channel group (or copy the default group).
- Click Add new channel, name it AI assistants.
- Add the condition Source · matches regex and paste the regex above.
- Save, then use Reorder to move AI assistants above Referral, so AI visits are not counted as ordinary referrals.
- In Reports → Acquisition → Traffic acquisition, switch the primary dimension to your new channel group. It applies to historical data too.
3. Looker Studio calculated field
4. GTM custom JavaScript variable
Returns the assistant's name (or undefined) from the referrer or utm_source. Send it as an event parameter, e.g. ai_source, and register it as a custom dimension.
What GA4's built-in AI channel misses
Published analyses show GA4's native AI assistant channel recognises ChatGPT, Gemini, Copilot, DeepSeek and Grok. Claude, Perplexity, Meta AI and Le Chat are not on that list, so their visits fall into Referral. Visits from AI mobile apps often carry no referrer at all and land in Direct, which no regex can fix.
Changelog
- 2026-10-05: First published list: 15 assistants, 18 hostnames.
How do I track ChatGPT traffic in GA4?
Create a custom channel group (Admin → Data display → Channel groups), add a channel called "AI assistants" with the condition Session source matches regex, paste the regex from this generator, and move the channel above Referral. Custom channel groups apply to historical data too.
The method, in the open.
When someone clicks a link inside an AI answer, the assistant's hostname usually arrives as the referrer, and GA4 records it as the session source, for example chatgpt.com or perplexity.ai. The generator builds one anchored regex that matches each hostname and its subdomains, in the RE2 syntax GA4 uses.
GA4 limits a regex to 256 characters. If your selection is longer, the generator splits it into several regexes to add as separate conditions joined with OR.
GA4 also has a built-in AI assistant channel. Published analyses show it recognises ChatGPT, Gemini, Copilot, DeepSeek and Grok, but not Claude or Perplexity. A custom group closes that gap and lets you choose the definition.
What the numbers look like.
With the default selection, the custom channel group catches sessions from ChatGPT, Perplexity, Claude, Gemini, Copilot, DeepSeek, Grok, Meta AI and Le Chat in one "AI assistants" channel. In GA4's Traffic acquisition report, switch the primary dimension to your custom channel group to see AI sessions, engagement and conversions next to Organic Search.
Expect the number to be an undercount: visits from AI mobile apps often carry no referrer and land in Direct.
What this is based on
- Custom channel groups support "matches regex" conditions and can be applied to historical data. Google Analytics Help
- GA4's native AI assistant channel covers ChatGPT, Gemini, DeepSeek, Copilot and Grok, but not Claude or Perplexity; app traffic often has no referrer. Terminus
- GA4 regular expressions are limited to 256 characters and use RE2 syntax. Optimize Smart
What it does not tell you
- Referrer-less visits are invisible to any regex. Traffic from AI mobile apps and some privacy browsers lands in Direct.
- Assistants change domains. We review the list monthly; the "last reviewed" date is shown under the generator.
- A matching source tells you the click came from an AI product, not which question was asked.
- GA4 regex is case-sensitive; sources are reported in lowercase, which the generated pattern expects.
Questions people ask.
Does GA4 track AI traffic automatically?
Partly. GA4's default channel grouping now has an AI assistant channel, but published analyses show it misses Claude and Perplexity. A custom channel group with this regex gives you a complete, controllable definition.
Is a custom channel group retroactive?
Yes. Custom channel groups in GA4 apply to historical data, so you can see AI traffic from before you created the group.
Why does some ChatGPT traffic show as Direct?
Clicks from the ChatGPT mobile app and some browsers do not pass a referrer. ChatGPT adds utm_source=chatgpt.com to many links, which helps, but not every click carries it.
What if GA4 says my regex is too long?
GA4 allows 256 characters per regex. The generator splits a long selection into several patterns; add each as its own condition and join them with OR.
Can I use this in Looker Studio?
Yes. Copy the CASE formula into a calculated field. It reuses the same pattern with REGEXP_MATCH and falls back to the default channel group.
How often should I update the regex?
Monthly, or whenever a new assistant becomes relevant in your market. The changelog under the generator records every change to the list.
Keep checking.
AI crawler checker
Is GPTBot, OAI-SearchBot, ClaudeBot or PerplexityBot blocked on your site? Checks robots.txt and tests your CDN, bot by bot.
Zero-click impact calculator
Paste your Search Console export to estimate clicks lost to AI Overviews and the upside of being cited. Pick the study you trust. Runs in your browser.
robots.txt AI policy generator
Pick a policy, such as "visible in AI search, no training", and get a commented robots.txt block for every AI bot. Merges with your existing file.
Let's grow it. GEO, done for you.
We find the questions buyers ask AI assistants in your category, check where you are cited, and close the gaps month by month.