AIScan cover: Count the AI clicks in GA4, with Google Analytics, Claude and Perplexity chips and three steps: read the AI Assistant row, build a regex channel, check Direct for leaks
AIScan cover: Count the AI clicks in GA4, with Google Analytics, Claude and Perplexity chips and three steps: read the AI Assistant row, build a regex channel, check Direct for leaks
AI Readiness

Track ChatGPT, Perplexity, Claude and Gemini Referrals in GA4

Count visits from ChatGPT, Claude and Perplexity in GA4 with the AI Assistant channel or a regex group. Google's own example regex gave false matches in our test.

2 Nov 2026 8 min read
#GA4#Google Analytics#AI referral traffic#ChatGPT#Claude#Perplexity#Umami#AI readiness

This guide covers B2 · Bot Access.

Table of contents

GA4 can show you the visitors that ChatGPT, Claude, Perplexity and Gemini send to your site, but only if the session source is read correctly. Google now ships a default "AI Assistant" channel, and a custom channel group fixes everything the default misses. On 2 November 2026 we read our own numbers: aiscan.site had 16 AI-assistant sessions in 28 days and xspeedcache.com had 58, none with a key event.

Quick summary

If you want to…Do thisTimeCatch
See AI traffic with no setupOpen the Traffic acquisition report and read the AI Assistant row of the default channel group2 minIt excludes Google's AI Overviews and AI Mode, and a stripped referrer still lands in Direct
Control which assistants countBuild a custom channel group with a "matches regex" rule, placed above Referral10 minGoogle's own example regex also matches thai and bbc.ai
Track without GA4Filter Umami by Referrer with "Matches regex"5 minSame blind spot: no referrer, no attribution
Count the bots that fetch youRead your server logs, not GA415 minJavaScript analytics cannot see crawlers

Short answer. Use the default AI Assistant channel first. Add a custom channel group only if you need a different list of assistants. Read both as a floor, because any click that arrives without a referrer is counted as Direct. For crawler counts, use server logs.

What this measures, and what it cannot

A referral from an assistant is a person who read an answer, then clicked a link in it. That is a different event from a crawl. A crawler fetches your page so the model can use it, and a person arrives later, if at all. The crawl-to-click gap is the reason we explained in why AI crawl statistics are hard to reproduce that the two numbers should never share a chart.

AIScan check B2 (bot access) grades whether user-driven fetchers such as ChatGPT-User are allowed in robots.txt. That is the precondition for a citation being clickable. GA4 sits on the other end: it counts the click, and it only runs in a browser. Read more on the bot access checks page.

Two blind spots apply to every method below:

  • Stripped referrers. Some apps open links without sending a referrer. GA4 then records the session as Direct, and no regex can recover it.
  • Google's own AI. Google's default channel description says AI Assistant excludes Google's AI Overviews and AI Mode. Those clicks stay in Organic Search.

Path 1: use the default AI Assistant channel

Google's default channel group page lists AI Assistant as a channel for visits "from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok". When the referrer matches Google's list, GA4 sets the medium to ai-assistant and the campaign to (ai-assistant).

  1. Open Acquisition > Traffic acquisition in your GA4 property.
  2. Keep the primary dimension on Session default channel group.
  3. Look for the row named AI Assistant.
  4. Click the row to see its source values. If you see claude.ai or perplexity.ai listed there, those assistants are on Google's list for your property. If one is missing, it is in Referral or Direct.
  5. Change the date range to match your last content change, so you compare like with like.

We did not find a start date for the channel on the help page, and we have not tested whether it rewrites past data. Treat data from before you first see the row as unlabelled, and use Path 2 to cover that period.

Path 2: build a custom channel group

A custom channel group lets you choose the list. Google's custom channel groups article says they can be applied to reports retroactively, and it gives an "AI assistants" example.

  1. Create a new custom channel group, or edit an existing one.
  2. Add a channel and name it AI assistants.
  3. Add a condition on Source, choose matches regex, and paste a pattern.
  4. Save the group.
  5. Reorder the channels so AI assistants sits above Referral. Rules are applied top to bottom, so a channel below Referral never sees the traffic.
  6. Open Acquisition > Traffic acquisition and pick your group as the primary dimension.

Which regex to paste

Google's example pattern is:

^.*ai|.*\.openai.*|.*chatgpt.*|.*gemini.*|.*gpt.*|.*copilot.*|.*perplexity.*|.*google.*bard.*|.*bard.*google.*|.*bard.*|.*.*gemini.*google.*$

We ran it in Python against 27 source values that we made up for the test, among them the ones our own properties show. Under a full-match reading it matched the assistants we listed except grok.com, and it also matched thai, bbc.ai, statuspage.ai, gptw.com and gpt-5-notes.dev. Under a partial-match reading it additionally matched mail.google.com and aiscan.site, because the first branch looks for "ai" anywhere. We do not know which reading your property applies, so test your pattern in the report before you trust it.

A tighter pattern lists the hosts. This one is built from the assistant domains in the list used by the analytics connector we query, version dated 7 October 2026:

^(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|claude\.ai|copilot\.microsoft\.com|chat\.deepseek\.com|grok\.com|meta\.ai|you\.com|phind\.com|poe\.com|chat\.mistral\.ai)$

On the same 27 test values it matched exactly the nine assistant hosts we put in, under both readings. It does not match www.perplexity.ai, so add (www\.)? in front if your data has it. Tagged links that use utm_source=chatgpt.com are covered, because the source field holds that value. Review the list every quarter, because assistants change hostnames.

Path 3: track it without GA4

Umami can do the same job from its filters. It lists Referrer under the Sources category and offers the operators Matches regex and Does not match regex.

  1. Open your website in Umami and click Filter at the top of the overview.
  2. Choose Referrer, then the operator Matches regex.
  3. Paste the tighter pattern above, without the ^ and $ if your version tests for a partial match.
  4. Add a second filter, UTM Source, with the same operator, and set the Match toggle to Any so either condition counts.
  5. Read the visitors, pages and countries panels with the filter applied.

Umami's docs say filters apply across all screens and reports, so the same view works on the pages report. We ran no Umami instance for this test, so the click path comes from its documentation only.

What we found on our own sites

On 2 November 2026 we read the 28 days from 5 October to 1 November through the analytics connector's AI referral report. It matches GA4's session source against its domain list. Google notes that the most recent dates can still be processing for up to 72 hours.

PropertyAI sessionsAll sessionsShareBy assistantKey events
aiscan.site165073.2%Claude 15, ChatGPT 10
xspeedcache.com584,0621.4%ChatGPT 54, Perplexity 40

Three points stand out:

  • The numbers are small. Sixteen sessions is a handful of people, not a trend. We are publishing the small figure on purpose, because we said in the crawl-statistics post that our own AI-referral table held no rows.
  • Where they landed is odd. 14 of the 16 aiscan.site sessions landed on /auth, and one on /pricing. We have not verified why, so we draw no conclusion.
  • xSpeed moved the other way. The previous 28 days showed 35 AI sessions out of 8,154, or 0.4%. The share rose to 1.4%, but total sessions halved, so the increase in share is partly a smaller denominator.

The aiscan.site property had no hostname filter set in the connector, so its figure may include some non-production hosts. xspeedcache.com was limited to its own hostname.

How to confirm it worked

  1. Run the scan. npx aiscan-cli yoursite.com, or paste the URL at aiscan.site. Check B2 tells you whether the fetchers that power clickable citations are allowed in. It does not read your analytics.
  2. Open Traffic acquisition and confirm your channel has rows with sessions above zero.
  3. Check for leaks. In the same report, add Session source / medium as a secondary dimension and look in Referral for chatgpt.com or claude.ai. Any you see mean your group sits below Referral.
  4. Check Direct. If Direct jumped when AI sessions fell, the referrer is being stripped.

If you would rather check by hand, run steps 2 to 4 on their own. They need only GA4, and no scan.

Common errors

  • The AI row is empty. Either your site has no AI clicks yet or your rule sits below Referral. Move it up and look at the date range.
  • Everything shows as Direct. The click arrived without a referrer. Add utm_source to links you control and accept the floor for the rest.
  • The regex matches your own site. A bare ai branch matches hosts such as aiscan.site. Use the host list instead.

Next step

Run npx aiscan-cli yoursite.com and read check B2 under the bot access checks. Then set up the default channel, read a week of data, and browse the rest of the AIScan guides. For the crawler side of the same question, start with the AI crawler user-agent list and Google AI Overviews: what you can control.

Frequently asked questions

What is the AI Assistant channel in GA4?

It is a default channel in GA4's default channel group for visits from sources like ChatGPT, Gemini, Deepseek, Copilot or Grok. Google says it excludes Google's AI Overviews and AI Mode. The medium is set to ai-assistant.

Where do I see AI assistant traffic in GA4?

Open Acquisition, then Traffic acquisition, and keep Session default channel group as the primary dimension. Look for the AI Assistant row, or select your custom channel group if you built one.

Why does my AI Assistant row show zero sessions?

Either your site has had no AI clicks, or a rule above it caught the traffic first. In a custom group, move the AI channel above Referral. Then check the date range.

Why is ChatGPT traffic showing as Direct?

Some apps open links without sending a referrer, so GA4 has no source to read and records Direct. No regex can fix that. Add utm_source to links you control and treat the AI figure as a floor.

My regex also matches sites that are not AI assistants. What is wrong?

Google's example pattern has a branch that matches any source ending in ai or, in a partial match, containing it. In our test it matched thai, bbc.ai and statuspage.ai. Use a pattern that lists exact hosts.

Does a custom channel group change my past data?

Google's help page says custom channel groups can be applied to reports retroactively. The default AI Assistant channel may not be, and we did not find a start date for it, so compare with a custom group.

Can GA4 count AI crawlers like GPTBot?

No. GA4 runs JavaScript in a browser, and crawlers do not run it. Count crawlers from server or edge logs instead.

Does Google AI Overviews traffic show up as AI Assistant?

No. Google's description says the AI Assistant channel excludes AI Overviews and AI Mode, so those clicks stay in Organic Search and cannot be split out with this channel.

M Asif Rahman

About the author

Entrepreneur, curious about AI

I have been building companies for a long time, and lately most of my curiosity goes to AI. AIScan is a small personal project I built on a flight from Dubai to Narita. I use it to understand how ready the web is for AI agents, and I share what the scans teach me.

Related guides

Browse every guide by check and platform