Key point. Paste referrer URLs, hostnames or GA4 source / medium pairs, one per line, and see which ones the AI-traffic pattern counts as AI referrals. The pattern is the one we use in our own reporting, and you can copy it into a GA4 channel group. It runs in your browser.
GA4 AI traffic regex tester
Test which visits GA4 would count as AI traffic
Paste referrer URLs, hostnames, GA4 "source / medium" pairs or landing URLs with utm tags, one per line. Each line is tested against the AI-source pattern we use in our own reporting. Nothing leaves your browser.
| Line | Source | Verdict | Matched |
|---|
How do I use the pattern in GA4?
Use it in a custom channel group so AI referrals get their own row in your reports. In GA4, open Admin, then Data display, then Channel groups, copy the default group, add a channel named "AI assistants" whose condition is Source matches the pattern above, and move that channel above Referral so it is checked first. Google's help pages on custom channel groups describe each screen. The pattern is wrapped as .*( ... ).*, so it gives the same answer whether a GA4 screen compares the whole source or only a part of it.
What does the tester count, and what does it miss?
It counts a visit as an AI referral when its source names an AI assistant or AI search product (ChatGPT, Perplexity, Gemini, Copilot, Claude and others in the pattern). It counts a visit with a paid medium (cpc, ppc, paid, display) as paid, even from an AI source, because a click on an ad is not a referral. It misses visits that arrive with no referrer at all: several assistants' apps open links that way, and GA4 then reports them as direct. No pattern can recover those.
Why test a pattern before using it?
Because a loose pattern counts the wrong sites and a narrow one misses new assistants. Running your own last 90 days of sources through the tester shows both: a source the pattern catches that is not an assistant, and an assistant your sources show that the pattern does not catch yet.
FAQ
Is anything I paste sent to Elementera?
No. The tester runs in your browser and nothing is uploaded.
Does this connect to my GA4 property?
No. Export your session sources from GA4 (or copy them from a report) and paste them in. The tester never reads your account.
Why is ChatGPT traffic sometimes tagged utm_source=chatgpt.com?
ChatGPT adds that tag to some links it shows, so the visit carries the source even when the browser sends no referrer. The tester reads utm_source from a pasted URL for that reason.
Work with us
Want to see whether ChatGPT and Gemini name your company for your buyers' questions? Get your free AI visibility report from Lenz. Want the measurement set up for you? Book a call about managed AEO services.
