Free tool · runs in your browser

Regex and filters for AI assistant traffic

Pick your analytics tool and the assistants you care about. You get a filter built from a sourced hostname list, with a test field to try it on a real referrer. Nothing is sent to a server.

  • 10 hostnames with a source, 6 more marked unverified, list last checked .
  • Syntax is labelled documented, partly documented or unverified, per tool. Where a tool's page gives no syntax, we say so.
  • Not sure what you are looking at? Try the referrer checker or clean a link with the UTM cleaner.

Analytics tool

Assistants

Hostnames

Only hostnames with a test or a vendor source.

UTM variants

For hand-made tags such as utm_source=chatgpt.

9 values for ga4.

Condition: Source matches regex
copilot\.microsoft\.com|chat\.deepseek\.com|gemini\.google\.com|chat\.mistral\.ai|perplexity\.ai|chatgpt\.com|www\.meta\.ai|grok\.x\.com|claude\.ai

Paste into a custom channel group or an Explorations filter on Session source.

Checked locally in your browser against the pattern above.

Syntax partly documented9 values

  • GA4 compares the whole value and is case-sensitive by default, so the pattern needs no anchors and the hostnames are written in lower case.
  • The pattern uses only literals, escaped dots and alternation, which every RE2-style engine accepts. Do not add lookahead or backreferences: RE2 does not support them.
  • Place the channel above Referral: traffic goes to the first channel whose rule it matches.
  • The list holds exact hostnames. A www. variant (for example www.chatgpt.com) is recognised by the referrer checker but is not in this pattern; add it if your reports show it.

What to do with the result

  • GA4

    Paste the regex into a custom channel group as Source matches regex, and place the channel above Referral.

    GA4 guide

  • Plausible and PostHog

    Use the native AI channel first and the printed values to cross-check one hostname at a time.

    Plausible guide

  • Matomo

    Use the segment Channel Type Is ai, or the referrerUrl segment on versions before 5.5.0.

    Matomo guide

Before you trust the numbers

A regex only counts visits that arrive with a referrer or a tag. Some surfaces send neither, and in October 2026 ChatGPT clicks were reported to lose both for a while. Published studies put the AI share of traffic anywhere from 0.32 % to 1.08 %, because they count different things. Read why AI clicks end up as Direct, the published numbers with their methods and the referrer behaviour changelog.

Open · checked 2026-10-19ChatGPT traffic dropped in GA4 from 9 October 2026What was reported, what OpenAI has and has not confirmed, and how to check your own data.

Setup guides

All guides: Setup guides. Open data: referrer dataset (CSV and JSON). How we source: methodology.