Free tools

GA4 AI Traffic Regex

Copy one regex into Google Analytics 4 and see how many visits ChatGPT, Perplexity, Gemini, Claude and other assistants send you, and to which pages.

Session source · matches regex
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|claude\.ai|you\.com|poe\.com|chat\.deepseek\.com|grok\.com|meta\.ai)$
  1. In GA4, open Explore and create a Free-form exploration.
  2. Add the dimension Session source (and Landing page + query string if you want pages) and the metrics Sessions and Key events.
  3. Under Filters, add Session source → matches regex → paste the regex below.
  4. Set the date range and break it down by Session source to see each assistant.

Want it in a standard report instead? In Admin → Data display → Channel groups, add a channel “AI assistants” with the condition Source matches regex, and place it above Referral. Or connect GA4 and let us do it.

Why measure AI traffic separately

It converts differently

Visitors who arrive from an AI answer have usually compared options already. Watch their key events apart from search and social.

It's hidden in referrals

By default GA4 lumps AI assistants into Referral with every other site. A dedicated filter or channel makes the trend visible.

It proves GEO work

When your AI visibility goes up, visits from assistants should follow. Measuring both closes the loop.

Questions

Frequently asked

Which AI assistants does the regex cover?+

ChatGPT (chatgpt.com and chat.openai.com), Perplexity, Gemini (and the old Bard address), Microsoft Copilot, Claude, You.com, Poe, DeepSeek, Grok and Meta AI.

Why do some AI visits show up as direct traffic?+

Apps and some answers open links without passing a referrer, so GA4 can't tell where the visit came from. The regex counts what GA4 can attribute; real AI traffic is usually higher.

Do AI Overviews and AI Mode count?+

No: clicks from Google's AI features arrive as google / organic, the same as regular search results, so GA4 can't separate them.

Can I see this without setting up GA4?+

Yes. Connect GA4 (or Plausible, PostHog, or our snippet) to a tracking account and AI visits are split by assistant and landing page automatically, next to how often each assistant recommends you.

Fixing your site is step one. Is AI recommending you?

Track how ChatGPT, Perplexity, Gemini and Google's AI answer the questions your buyers ask, against your competitors, every week.