
To track AI search traffic, you need three tools, and each one sees a different part of it. GA4 shows the visits. Since May 13, 2026 it puts recognized assistants in a built-in AI Assistant channel, and a custom channel built from the regex below catches the sources Google’s list does not name. Search Console shows Google’s own AI features: clicks from AI Overviews and AI Mode are counted inside the normal Performance report, and the Generative AI performance report shows how many impressions your pages got there. Your server logs show the AI crawlers and the fetches users trigger, which never appear in GA4 at all.
This page gives you the exact setup for all three, checked against Google’s, OpenAI’s, Anthropic’s and Perplexity’s own documentation on November 1, 2026. It ends with a weekly report template that puts the numbers on one sheet.
The AI referrer regex for GA4 (copy and paste)
Paste this into any GA4 field that offers “matches regex”: a custom channel condition, an exploration filter, a report filter or an audience condition.
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|chat\.deepseek\.com|grok\.com|meta\.ai)$It is 163 characters, so it fits inside GA4’s 250-character regex limit. It is written for full matching on purpose. Google’s regex help page says GA4 regex “is full regex and case sensitive” by default, so an unanchored pattern only matches values that are exactly equal to it. The (.*\.)? prefix lets the pattern match a bare host (perplexity.ai) and any subdomain of it (www.perplexity.ai) without matching lookalikes such as notchatgpt.com.
| Host in the regex | Product | Why it is included |
|---|---|---|
| chatgpt.com | ChatGPT | The source value OpenAI documented for ChatGPT referrals (utm_source=chatgpt.com, see below) |
| chat.openai.com | ChatGPT (old address) | Now redirects to chatgpt.com (HTTP 308, checked November 1, 2026). Older links and data can still carry it |
| perplexity.ai, www.perplexity.ai | Perplexity | perplexity.ai redirects to www.perplexity.ai, so both hostnames can show up as the source |
| claude.ai | Claude | Named in Google’s own May 13, 2026 release note as an AI assistant source |
| gemini.google.com | Gemini app | Gemini’s web address. bard.google.com now redirects here |
| copilot.microsoft.com, copilot.com | Microsoft Copilot | copilot.microsoft.com now declares copilot.com as its canonical address, so both are covered |
| chat.deepseek.com, grok.com | DeepSeek, Grok | Google’s channel definitions name Deepseek and Grok as AI Assistant sources |
| meta.ai | Meta AI | Listed as an observed referrer host in Terminus’s referrer table (updated September 16, 2026) |
What it leaves out, on purpose: google.com, because clicks from AI Overviews and AI Mode arrive as Google organic traffic and cannot be separated in GA4 (Google’s channel definitions put them in Organic Search). openai.com on its own, because help.openai.com and platform.openai.com send documentation readers, not ChatGPT answer clicks.
How it compares with the patterns people copy:
- Google’s own example in the custom channel groups help article starts with
^.*ai|. Under full matching, that branch catches any source ending in “ai”, so it does catch claude.ai and perplexity.ai. It also catches unrelated .ai websites that link to you, and it misses grok.com and chat.deepseek.com. - Loose keyword patterns such as
chatgpt|openai|claude|gemini|perplexity, used with “partially matches regex”, also catch blog posts and tools that just have those words in their domain.
Use one version of the regex across every property and report you run, and write down the date you change it. If you edit it halfway through a month, your month-over-month numbers will not line up. For where this tracking fits in a wider plan, our guide on how business coaches get cited by AI search lays out a 30-day visibility sprint.
What GA4 now does on its own: the AI Assistant channel
On May 13, 2026, Google added “New AI Assistant traffic measurement” to GA4 (What’s new in Google Analytics). When the referrer matches Google’s list of recognized AI assistants, GA4 now sets three values automatically:
| Dimension | Value GA4 assigns |
|---|---|
| Session medium | ai-assistant |
| Session campaign | (ai-assistant) |
| Session default channel group | AI Assistant |
The default channel group definitions describe the channel as visits “from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok”, and say it “excludes Google’s AI Overviews and AI Mode”, which stay in Organic Search. The release note also names Claude.
Two gaps remain. Google does not publish the full list of assistants it recognizes (its downloadable list of sources and categories, checked November 1, 2026, has no AI entries), and Perplexity is not named in either document. Check before you build anything: open Reports, Acquisition, Traffic acquisition, set the dimension to Session source / medium, and search for “perplexity”. If it shows as perplexity.ai / referral or www.perplexity.ai / referral, the built-in channel is missing it and you need the custom channel below.
How to build an AI channel group in GA4, step by step
You need the Editor role or higher on the property. Every step below follows Google’s custom channel groups article.
- Go to Admin. Under Data display, click Channel groups.
- Click Create new channel group. Your first custom group starts as a copy of the default group, so all the standard channels are already there.
- Name the group, for example “Channels with AI assistants”.
- Add a new channel and name it “AI assistants”.
- Click Add condition group. Choose Source, choose matches regex, and paste the regex above.
- Drag “AI assistants” above Referral. GA4 puts each visit in “the first channel whose definition it matches given the current order of channels”, so a channel placed under Referral stays empty. Google’s article adds that you can also place it above Organic Search if you need to.
- Click Save group.
- Check it: open Reports, Acquisition, Traffic acquisition and switch the primary dimension to your new group.
Three limits from the same article: a standard property gets 2 custom channel groups (360 properties get 5), each group holds up to 50 channels, and custom groups “can be applied to your reports retroactively”, so you see your history right away. You can also make the new group the primary channel group for the whole property in the same Channel groups screen.
Build an exploration that shows which pages AI sends people to
The channel tells you how much traffic you get. An exploration tells you which pages it lands on and what the visitors do next.
- Before you start, check how long GA4 keeps data. Google’s Explorations guide says properties keep 2 months by default. Change it in Admin, Data collection and modification, Data Retention.
- Click Explore in the left menu and start a blank exploration. Keep the technique as Free form.
- Under Dimensions, add Session source / medium, Landing page + query string and your custom channel group. Custom channel groups are available as dimensions in explorations.
- Under Metrics, add Sessions, Engaged sessions, Key events and Session key event rate.
- Rows: Landing page + query string. Columns: Session source / medium.
- Filter: Session source, matches regex, and the same regex. (Explorations allow up to 10 filters per tab.)
- Sort by Sessions. A landing page URL that ends in
?utm_source=chatgpt.comshows you exactly which page ChatGPT linked to.
Compare AI visitors with organic search visitors
Comparisons do not accept regex. According to Google’s comparisons article they take exact matches or “contains” only, so compare channels instead of individual sources.
- Open Reports, Acquisition, Traffic acquisition.
- Click the comparison icon at the top right, then + Create new.
- Comparison 1: Dimension Session default channel group, exactly matches AI Assistant.
- Comparison 2: the same dimension, exactly matches Organic Search.
- Click Apply and read engaged sessions, key events and session key event rate side by side.
- To reuse it, save it in Admin, Data display, Comparisons. You can save up to 200 comparisons per property.
If Perplexity is not in the built-in channel, change the report’s primary dimension to your custom channel group instead. The “AI assistants” and “Organic Search” rows then sit next to each other with no comparison needed. Our guide to digital marketing analytics covers the key events and UTM rules these numbers depend on.
Does ChatGPT add utm_source=chatgpt.com to links?
OpenAI said it did. The OpenAI Help Center article “Publishers and Developers FAQ” said: “ChatGPT automatically includes the UTM parameter utm_source=chatgpt.com in referral URLs, enabling clear tracking and analysis of inbound traffic from ChatGPT search results.” That text is in the Wayback Machine copy from October 4, 2026. By October 21, 2026, the article’s address was redirecting to a different help article about ChatGPT Atlas, so OpenAI no longer has a live page that confirms the parameter.
What this means for you:
- When the tag is present, GA4 reads it as the session source. The visit shows as chatgpt.com in your reports, and the regex above catches it.
- Do not add your own UTM tags to links you hope ChatGPT will cite. ChatGPT controls the link it shows, and Google’s Direct channel rule already puts untagged visits with no referrer (source “(direct)”) in Direct.
- Search your server logs for the string (command below). That shows you directly whether tagged ChatGPT clicks are still reaching your site.
Search Console: where AI Overviews and AI Mode clicks show up
Google’s AI features documentation says sites that appear in AI Overviews and AI Mode “are included in the overall search traffic in Search Console”, inside the Performance report under the “Web” search type. There is no filter that separates them. The counting rules are in Google’s Performance report methodology:
| Feature | Click | Impression | Position |
|---|---|---|---|
| AI Overviews | A click on a link to an external page in the AI Overview | Standard impression rules | The AI Overview takes one position, and every link in it gets that same position |
| AI Mode | A click on a link to an external page in AI Mode | Standard impression rules | Same method as a normal results page. A follow-up question counts as a new query |
Search Labs experiments are not included in either one.
The Generative AI performance report
Google announced Search Generative AI performance reports on June 3, 2026 for a subset of sites, then added a note that they had rolled out to all websites worldwide as of August 31, 2026. The help page for the Search report covers what it contains:
- Metric: impressions only, meaning “how many times links to your site were shown to a user in a generative AI feature on Google Search.” It does not report clicks, CTR or position.
- Features covered: AI Overviews and AI Mode. A separate report covers Discover.
- Dimensions: pages (the final URL after redirects, usually the canonical), countries, dates and devices. You can also filter by “Web: text-based” or “Web: multimodal” (Lens, Circle to Search).
- Counting: two links from your site in the same AI feature count as one impression in the chart total. The Performance report’s 1,000-row table limit applies.
- Not seeing it? Google says this “usually happens when your site hasn’t received enough impressions” in AI features.
Look at one setting while you are there: Settings, Search generative AI. Google’s Search generative AI control (rolled out to all sites as of August 31, 2026) lets an owner exclude the site from AI Overviews, AI Mode and Discover’s AI features. If someone has chosen “Exclude”, you “won’t receive any traffic or impressions from these features.” The default is Include, and the control does not affect model training. That is handled separately by Google-Extended.
Bing Webmaster Tools AI Performance
Bing has the only first-party report here that counts citations, not just impressions. Its AI Performance report (public preview, February 10, 2026) covers Microsoft Copilot, AI summaries in Bing and some partner integrations. It shows total citations, average cited pages per day, page-level citations and a sample of the “grounding queries” the AI used to find your content. A June 16, 2026 update added Intents, Topics, Citation Share (your share of all citations shown for a grounding query) and period-over-period Compare. If your site is not verified in Bing yet, our Bing Webmaster and IndexNow setup walks through it.
Server logs: which AI bots visited, and what they read
GA4 runs in the browser, so bots never show up there. Your access log records every request with its user agent. Each vendor names its bots and publishes their IP ranges:
| Token in the user agent | Vendor | What it does (vendor’s own wording) | Follows robots.txt? | IP list |
|---|---|---|---|---|
| OAI-SearchBot | OpenAI | Surfaces sites in ChatGPT search. Opted-out sites “will not be shown in ChatGPT search answers” | Yes. Changes take about 24 hours | searchbot.json |
| GPTBot | OpenAI | Crawls content that may be used to train OpenAI’s foundation models | Yes | gptbot.json |
| ChatGPT-User | OpenAI | Visits a page when a ChatGPT user’s question calls for it. Not used for automatic crawling or to decide what appears in Search | “robots.txt rules may not apply” | chatgpt-user.json |
| ClaudeBot | Anthropic | Collects web content that could contribute to model training | Yes | bots.json |
| Claude-User | Anthropic | Fetches pages when a person asks Claude a question | Yes. Blocking it may reduce visibility for user-directed web search | |
| Claude-SearchBot | Anthropic | Indexes content to improve Claude’s search results | Yes | |
| PerplexityBot | Perplexity | Surfaces and links sites in Perplexity search results. Not used for foundation model training | Yes. Up to 24 hours | perplexitybot.json |
| Perplexity-User | Perplexity | Visits a page to answer a user’s question | “Generally ignores robots.txt rules” | perplexity-user.json |
| Google-Extended | A robots.txt token only. It controls Gemini training and grounding, and “does not impact a site’s inclusion in Google Search” | Yes (it only exists in robots.txt) | None. It “doesn’t have a separate HTTP request user agent string” |
Sources: OpenAI crawler docs, Anthropic’s crawler article (April 7, 2026), Perplexity crawler docs and Google’s common crawlers list (updated October 30, 2026). You will never see Google-Extended in a log. AI Overviews and AI Mode use ordinary Googlebot crawling, which Google’s AI features page calls “the control” for Search.
The commands below assume the combined log format that most Apache and Nginx setups use and work on macOS and Linux. Replace access.log with your file. For rotated, gzipped logs, swap grep for zgrep -h, and feed the awk commands with gzip -dc access.log.*.gz | instead of a file name.
1. Hits per AI bot, one count per request:
awk 'match($0,/GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User/){print substr($0,RSTART,RLENGTH)}' access.log | sort | uniq -c | sort -rn2. Pages fetched because a user asked an AI something (the closest thing to a log of AI answers that used your page):
grep -E 'ChatGPT-User|Claude-User|Perplexity-User' access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -203. AI bots your server or firewall turned away (any 403 or 429 here means a security rule is blocking them):
grep -E 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User' access.log | awk '$9 >= 400 {print $9, $7}' | sort | uniq -c | sort -rn4. Search-index crawls per day (OAI-SearchBot, Claude-SearchBot, PerplexityBot):
grep -E 'OAI-SearchBot|Claude-SearchBot|PerplexityBot' access.log | awk '{print substr($4,2,11)}' | sort | uniq -c5. Human visits referred by AI assistants, including visitors GA4 never records because they declined cookies or block scripts:
awk -F'"' '$4 ~ /^https?:\/\/([a-z0-9-]+\.)*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|chat\.deepseek\.com|grok\.com|meta\.ai)(\/|$)/ {split($2,r," "); print $4, r[2]}' access.log | sort | uniq -c | sort -rn6. ChatGPT-tagged landings:
grep -c 'utm_source=chatgpt\.com' access.log7. Check that a “GPTBot” is really OpenAI’s. Anyone can fake a user agent, so match the IP against the vendor’s published list. This example tests an IP against OAI-SearchBot’s ranges. Swap the URL for any IP list in the table above:
curl -s https://openai.com/searchbot.json | python3 -c 'import json,sys,ipaddress; ip=ipaddress.ip_address(sys.argv[1]); print(any(ip in ipaddress.ip_network(p.get("ipv4Prefix") or p.get("ipv6Prefix")) for p in json.load(sys.stdin)["prefixes"]))' 203.0.113.7It prints True or False. Anthropic warns that blocking its bots by IP “may not work correctly or persistently guarantee an opt-out”, so use robots.txt to block them and use IPs only to check who is visiting. Bot access is the first gate to getting cited. Structured data is the next one, and it is covered in schema markup for AI search citations.
The weekly AI-visibility report: a template with exact fields
Pull these numbers every Monday for the previous Monday to Sunday. Each row says where the number comes from and what to do when it moves. The “act when” rules are my own rules of thumb, not industry benchmarks. Adjust them once you have a few months of your own data.
| # | Field | Exactly where to pull it | Act when |
|---|---|---|---|
| 1 | week_start, regex_version | Monday’s date; the date you last edited the regex | Regex changed this week: note it, because totals will jump |
| 2 | ga4_ai_sessions_custom | Traffic acquisition, primary dimension = your custom group, row “AI assistants” | Down two weeks in a row: run fields 14 and 15 before touching content |
| 3 | ga4_ai_sessions_builtin | Same report, Session default channel group, row “AI Assistant” | Field 2 much higher than field 3: list the extra sources in notes |
| 4 | ai_sessions_by_source | Exploration above, columns = Session source: chatgpt.com, perplexity, claude.ai, gemini, copilot, other | A new host appears under Referral that looks like an assistant: add it to the regex |
| 5 | ai_engaged_sessions | Same exploration, Engaged sessions | None. This is context for field 6 |
| 6 | ai_key_events, ai_key_event_rate | Same exploration, Key events and Session key event rate | A page gets AI sessions but no key events for four weeks: add a clear next step on that page |
| 7 | top5_ai_landing_pages | Same exploration, rows = Landing page + query string | None. Compare with field 9 |
| 8 | gsc_ai_impressions, change_vs_prior_week | Search Console, Generative AI performance report (Search), last 7 days, then the 7 days before | Falls to zero: check Settings, Search generative AI first |
| 9 | top5_gsc_ai_pages | Same report, Pages tab | Page has AI impressions but no AI sessions: check that the answer and a link to act on sit near the top of the page |
| 10 | gsc_web_clicks, gsc_web_impressions | Performance, Search results, Search type: Web (AI Overview and AI Mode clicks are inside this) | Impressions up, clicks down: compare with field 8 |
| 11 | bing_ai_citations, bing_avg_cited_pages | Bing Webmaster Tools, AI Performance | None. Track the trend |
| 12 | top5_bing_grounding_queries | Same report, Grounding queries | A grounding query with no page that answers it directly: write or extend that section |
| 13 | log_search_crawls | Log command 4: OAI-SearchBot, Claude-SearchBot, PerplexityBot | Zero for a bot all week: check robots.txt and your firewall |
| 14 | log_user_fetches, top5_fetched_urls | Log commands 1 and 2: ChatGPT-User, Claude-User, Perplexity-User | None. These are the pages AI tools read while answering |
| 15 | log_ai_bot_errors | Log command 3 | Any 403 or 429: fix the WAF or security plugin rule the same day |
| 16 | log_ai_referrals_vs_ga4 | Log command 5 total, next to field 2 | None. The gap shows how much GA4 misses because of consent and blockers |
| 17 | intake_ai_answers | CRM or form field “How did you hear about us?” answers that mention ChatGPT, Claude, Perplexity, Gemini or Copilot | None. This catches AI-influenced buyers who later arrive as direct or branded search visits |
| 18 | action_shipped, owner | One change made because of this sheet, and who made it | Blank three weeks running: the report is not being used |
Header row to paste into Google Sheets:
week_start,regex_version,ga4_ai_sessions_custom,ga4_ai_sessions_builtin,sessions_chatgpt,sessions_perplexity,sessions_claude,sessions_gemini,sessions_copilot,sessions_other_ai,ai_engaged_sessions,ai_key_events,ai_key_event_rate,top5_ai_landing_pages,gsc_ai_impressions,gsc_ai_impressions_change,top5_gsc_ai_pages,gsc_web_clicks,gsc_web_impressions,bing_ai_citations,bing_avg_cited_pages,top5_bing_grounding_queries,log_search_crawls,log_user_fetches,top5_fetched_urls,log_ai_bot_errors,log_ai_referrals,intake_ai_answers,action_shipped,ownerRun a fixed prompt check once a month as well. Ask ChatGPT, Perplexity, Claude and Google AI Mode the same 10 buyer questions and log whether you were named and which URL was cited. The accounting-firm guide has a worked prompt set and log format you can adapt to any field.
What these numbers can and cannot tell you
Clicks undercount AI exposure by a wide margin. In Pew Research Center’s March 2025 browsing data from 900 US adults, users clicked a link inside a Google AI summary on 1% of visits to pages that showed one. They clicked a traditional result on 8% of those visits, against 15% when no summary appeared (Pew, July 22, 2025). Our AI search statistics for 2026 keeps the dated series on how much referral traffic AI tools send.
Read the sheet with three rules in mind:
- GA4 AI sessions are a floor. A visit with no referrer and no UTM goes to Direct by Google’s own channel rule, whatever sent it.
- Search Console AI impressions are a different thing from AI citations in ChatGPT or Claude. They cover Google’s features only. Bing’s AI Performance report covers Copilot, and nothing first-party covers ChatGPT, Claude or Perplexity citations. That is why the prompt check exists.
- Log fetches are the most direct signal you have. A ChatGPT-User or Claude-User request means a live answer read your page, even if nobody clicked through.
If you want this set up in your own GA4, Search Console and hosting accounts, with the weekly sheet running, you can book a consultation.
Ready to scale your revenue?
Book a free 30-min consultation. We’ll diagnose your growth bottleneck and map out the 3 highest-leverage moves for your business.
Frequently asked questions
How do I track ChatGPT traffic in GA4?
Check Reports, Acquisition, Traffic acquisition for the built-in AI Assistant channel, added on May 13, 2026. Then create a custom channel group under Admin, Data display, Channel groups. Add an "AI assistants" channel with Source matching a regex that includes chatgpt.com, and drag it above Referral. Visits without a referrer or UTM still land in Direct.
What is the AI Assistant channel in GA4?
It is a default channel Google added on May 13, 2026. When the referrer matches Google's list of recognized AI assistants, GA4 sets the medium to ai-assistant and the campaign to (ai-assistant). Google names ChatGPT, Gemini, Claude, Deepseek, Copilot and Grok as examples but does not publish the full list. Google's own AI Overviews and AI Mode stay in Organic Search.
Does Google Search Console show AI Overviews and AI Mode traffic?
Yes. Clicks and impressions from AI Overviews and AI Mode are counted in the Performance report under the Web search type, mixed with regular results, and cannot be filtered out. The separate Generative AI performance report, rolled out to all sites by August 31, 2026, shows impressions in those features by page, country, date and device, but no clicks.
Does ChatGPT add utm_source=chatgpt.com to links?
OpenAI's Publishers and Developers FAQ said ChatGPT automatically adds utm_source=chatgpt.com to referral URLs, according to an archived copy from October 4, 2026. That address now redirects to a different help article, so check your own server logs or GA4 landing pages for the parameter to confirm it is still being added to clicks.
Why does ChatGPT traffic show as direct in GA4?
GA4 assigns a visit to Direct when its source is (direct) and its medium is (none) or (not set). That happens when a click arrives with no referrer and no UTM tag, for example when someone copies a link out of an AI answer and pastes it into a browser. No GA4 setting can recover those visits, so treat your AI channel numbers as a minimum.
How do I see AI bots like GPTBot and ClaudeBot in my server logs?
Search your access log for the user-agent tokens GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-User, Claude-SearchBot, PerplexityBot and Perplexity-User, then check the request IP against each vendor's published IP list. Google-Extended never appears in logs because it is only a robots.txt token and has no user agent of its own.
Does blocking GPTBot remove my site from ChatGPT search?
No. OpenAI says each setting is independent: GPTBot controls whether content may be used for model training, while OAI-SearchBot controls whether your site appears in ChatGPT search answers. You can allow OAI-SearchBot and disallow GPTBot in robots.txt. OpenAI says search changes take about 24 hours to take effect.
More AI & Automation guides
- MSP Marketing: How Managed Service Providers Win Clients That Cost $15K to $30K to Acquire
- Net Promoter Score: Calculation, Benchmarks, and How to Raise It
- No-Code Automation in 2026: Tools & Limits
- Nonprofit Marketing: A Small-Budget Playbook That Wins Donors
- North Star Metric: How to Choose the One Number That Measures Value
- Online Course Marketing: A Funnel-First Playbook
- All SEO guides →
About the author
Christoph Olivier Christoph Olivier is the founder of CO Consulting and a fractional CMO who has managed millions of dollars in ad spend and built a combined audience of over a million followers across social platforms. He works with 7- and 8-figure businesses, primarily in tax, M&A, consulting, real estate investing, capital raising, and financial services. His edge is a practitioner’s command of every major marketing channel, theory and execution, backed by the original marketing data reports he publishes here on CO Consulting.