AI search
Track ChatGPT and AI traffic in GA4
Get a tested regex for visits from ChatGPT, Perplexity, Gemini, Copilot, Claude and other AI assistants, with step-by-step setup for GA4, Looker Studio, PostHog and Plausible.
Free · No signup · Runs in your browser
Your regex for 11 AI sources
Matches each domain and its subdomains, and nothing that merely contains the name.
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|chat\.mistral\.ai|chat\.deepseek\.com|you\.com|meta\.ai|grok\.com)$Type a source as GA4 shows it, like chatgpt.com or perplexity.ai.
Set it up
A channel of its own, in every acquisition report
- In GA4, open Admin, then Data display → Channel groups. You need Editor access.
- Click Create new channel group and name it, for example
Channels with AI. It starts as a copy of the default channels. - Click Add new channel and name it
AI assistants. - Add a condition: Source, matches regex, then paste the regex above. Save the channel.
- Click Reorder and drag AI assistants above Referral. GA4 puts each visit in the first channel that matches, so below Referral it would catch nothing. Apply, then Save group.
- In Reports → Acquisition → Traffic acquisition, switch the table’s first column to your new channel group. It works on past data too.
Or: an exploration, to see which pages AI sends people to
- Open Explore and start a Blank exploration.
- Add the dimensions Session source and Landing page + query string, and the metrics Sessions, Engaged sessions and Key events.
- Under Filters, choose Session source, matches regex, and paste the regex.
- Drag Session source and Landing page into Rows, and the metrics into Values.
Standard GA4 properties allow two custom channel groups, so name this one for general use.
What this can and can’t see
- ChatGPT tags its links. It often adds
utm_source=chatgpt.com, so those visits can show up in GA4’s default channels as Unassigned rather than Referral. The rule above matches on source, so it catches both. - Some AI visits have no referrer. Links opened from desktop and mobile apps, or copied and pasted, arrive as Direct. No regex can label those.
- Google’s AI answers count as Google. Clicks from AI Overviews and AI Mode arrive as google / organic, mixed with normal search clicks.
How it works
Tick the AI assistants to track, and add any other sources you see in your reports.
Copy the regex. Test any source value to check it matches.
Follow the steps for your analytics tool to give AI visits a channel of their own.
Why AI traffic hides in GA4
GA4 sorts visits into channels like Organic Search, Referral and Direct, and its default channels have none for AI assistants. A visit from a link in a ChatGPT answer lands in Referral, or often in Unassigned, because ChatGPT tags many links with utm_source=chatgpt.com and a source without a medium matches none of GA4's default rules. Visits from Perplexity, Gemini, Copilot and Claude arrive as referrals from their domains, mixed in with every other site that links to you.
A custom channel group fixes that. You add an AI assistants channel, define it with one regex, and place it above Referral. From then on every acquisition report can show AI visits as a line of their own, and Google applies custom channel groups to your past data too.
How the regex works
The regex lists each assistant's domain with its dots escaped, so a dot means a dot rather than any character. It's anchored at both ends and allows subdomains, so it matches chatgpt.com, www.perplexity.ai and gemini.google.com, but not a look-alike such as notchatgpt.com.evil.com. Because it's anchored, it works the same whether you pick GA4's "matches regex", which needs the whole value to match, or "partially matches regex".
Use the test box to check a source exactly as it appears in your reports. If you spot another assistant in your referral list, add its domain under Other sources and the regex updates. The Looker Studio version writes dots as [.] so it can go straight into a formula without doubled backslashes.
What to look at once it's set up
- Which pages AI assistants send people to. An exploration with Landing page shows the content they link to most.
- Engagement and key events. AI visitors often arrive with one specific question, so compare how they behave and convert with visitors from search.
- The trend. Monthly AI sessions, by assistant, show whether work on your content and brand is being picked up.
- Accuracy. Pages that get AI traffic are worth keeping correct and current, because assistants repeat what they say.
What no regex can see
Some AI-driven visits carry no referrer at all. Links opened from desktop and mobile apps, links copied into a browser, and assistants that hide the referrer all land in Direct, and nothing in GA4 can label them. Clicks from Google's AI Overviews and AI Mode arrive as google / organic, the same as normal search clicks, so they can't be separated either.
A visit is also only the end of the story. Assistants often answer without sending anyone, so being mentioned matters as much as being clicked. The AI visibility checker shows whether assistants mention you for the questions your buyers ask.
Questions people ask
Does GA4 have a built-in AI channel?
Not in its default channel group. Google's own help pages show how to add an AI assistants channel to a custom channel group, which is what these steps do.
Will it work on my old data?
Yes. Custom channel groups apply to past data in reports. If you use the channel group in an audience, that only counts from the day you change it.
Why does the channel have to sit above Referral?
GA4 gives each visit to the first channel whose rule it matches, working from the top. Below Referral, every AI visit would already have been counted as a referral.
Why is my ChatGPT traffic so low?
Many people read the answer and never click, and some clicks arrive without a referrer and show as Direct. Low numbers here don't mean ChatGPT never mentions you.
Do I have to connect my analytics?
No. The regex is built in your browser and nothing is sent to us. You paste it into your own tools.
Want it done for you?
Romeo works on getting you cited, not just counted
He finds the questions AI assistants answer in your market, improves the pages they should be citing, checks that AI crawlers can read your site, and sends each change for you to approve.

