GA4 AI Traffic Regex Generator

The GA4 AI Traffic Regex Generator is a free browser tool that builds a regular expression for the sources AI assistants send to Google Analytics 4. Paste it into a custom channel group and your AI traffic gets a channel of its own instead of sitting inside Referral.

It sits with the rest of our free tools at Free AI Search Tools.

How to use it

  1. Choose the AI assistants to include. Each one adds the domains it sends visits from, such as chatgpt.com or perplexity.ai, and their subdomains.
  2. Optionally turn on Also match utm_source names to catch links you tag yourself, such as utm_source=chatgpt.
  3. Copy the regex. You can test any session source in the box below it before you use it.

Add it to Google Analytics 4

  1. In Google Analytics 4, open Admin, then Data display > Channel groups.
  2. Select Create new channel group and give it a name.
  3. Select Add new channel, name it AI assistants, set the condition Source matches regex and paste your regex.
  4. Use Reorder to move AI assistants above Referral, because GA4 assigns each session to the first channel that matches.
  5. Save the group, then pick it in your Acquisition reports.

A custom channel group also applies to data collected before you created it.

What the regex cannot see

  • Google AI Overviews and AI Mode: clicks from them arrive as google / organic, the same as regular search results, so no source regex can separate them.
  • Visits without a referrer: some AI apps and in-app browsers send no referrer, so GA4 counts those visits as Direct. Treat the AI traffic you see as a minimum.

To see AI sessions, conversions and revenue by assistant without maintaining a regex, connect Google Analytics 4 or another analytics tool in AI Traffic.

Privacy

The regex is built in your browser. Nothing you type is sent to us.

Was this article helpful?

If something is still unclear or you spotted an issue, let us know and we will improve this guide.

Get in touch

Start tracking your AI visibility

See how your brand appears across ChatGPT, Perplexity, Gemini, and Google AI. Start your 14-day free trial in minutes.

Start Free Trial
14-day free trial
Cancel anytime

Not ready to buy yet? Schedule a demo and discover LLM Pulse with our founders