How to track ChatGPT and AI traffic in GA4

·7 min read

GA4 now sorts some AI traffic into its own AI Assistant channel, but Google doesn't publish which assistants it recognizes, so you need your own filter to count all of it. Filter Session source with a regex of assistant hostnames such as chatgpt.com, perplexity.ai and gemini.google.com, then make it permanent with a custom channel group whose "AI assistants" channel sits above Referral. Treat the number you get as a floor. Clicks that arrive without a referrer, answers nobody clicks and crawler visits never reach GA4.

Left alone, AI referral traffic hides inside Referral and Direct, mixed in with blogs, newsletters and bookmarks. The setup below takes about ten minutes.

Does GA4 have an AI assistant channel?

Yes. Google's Analytics release notes date it May 13, 2026. When a session's referrer matches Google's list of recognized assistants, GA4 sets the medium to ai-assistant and the campaign to (ai-assistant), and the session lands in a new AI Assistant channel in the default channel group. There is nothing to configure.

The catch is the list. Google's default channel definitions name ChatGPT, Gemini, DeepSeek, Copilot and Grok as examples and say AI Overviews and AI Mode are excluded. The full referrer list isn't published, and Perplexity isn't named. A June 11, 2026 release added a separate Source group dimension that rolls variant source names into one value, with built-in groups for ChatGPT and Perplexity.

Use the native channel as a cross-check. You can't see or edit its list, so you can't tell what it missed until you look.

How to see ChatGPT traffic in Google Analytics

The fastest check takes a minute in the standard reports.

  1. Open Reports > Acquisition > Traffic acquisition.
  2. Click the dimension name above the first column of the table and switch it to Session source / medium.
  3. Type chatgpt in the search box above the table.

Each row shows a source and medium pair with its sessions, engagement rate and key events. Repeat with perplexity, gemini and claude. If perplexity.ai shows the medium referral for dates after May 13, 2026, the native channel didn't claim it, and any AI total you read off the default channel group is short.

Searching one assistant at a time gets old fast. A regex covers all of them in one filter.

A GA4 regex for AI referral traffic

Match the source against one anchored regex of assistant hostnames. This is the pattern our guide generates from 16 hostnames across 14 assistants.

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

The optional (.*\.)? prefix matches subdomains such as www.perplexity.ai. The anchors stop it from matching hosts that only contain an assistant's name. That matters more than it looks. Google's own channel group help page suggests a looser pattern built from fragments like .*gpt.* and .*gemini.*, which also match unrelated hosts such as gemini.com, a crypto exchange. It has no pattern for Claude either, even though the same page names Claude as an example.

Watch the length. Google's help page on report filters limits regular expressions to 250 characters. The pattern above is 241, so almost any hostname you add pushes it over. When that happens, split the list into two patterns and add them as separate conditions joined with OR.

Build a GA4 AI traffic report in Explore

An exploration shows which pages AI assistants send people to, which the standard reports make awkward.

  1. Open Explore and pick the Free form template.
  2. In the Variables column, click + next to Dimensions and import Session source and Landing page + query string.
  3. Click + next to Metrics and import Sessions, Engaged sessions and Key events.
  4. Drag both dimensions into Rows and the three metrics into Values.
  5. Under Filters, choose Session source, set the condition to matches regex, paste the pattern and click Apply.
  6. Set the date range at the top of the Variables column.

The landing page list is the part worth reading. It tells you which pages AI answers link to, the closest thing GA4 has to a citation report. Pages that show up here deserve the same care as your best organic landing pages.

One limit catches people out. Explorations only reach back as far as the setting in Admin > Data collection and modification > Data retention, and a new property starts at two months. Raise it to 14 months now if you haven't. Standard reports aren't affected, which is one more reason to build the channel group.

Create an AI assistants channel above Referral

A custom channel group puts AI traffic into every acquisition report with no filter to remember, and Google applies it to past data too.

  1. Go to Admin > Data display > Channel groups. You need the Editor role.
  2. Click Create new channel group. GA4 starts you from a copy of the default group, so the existing channels are already there. Give the group a name such as "Channels with AI".
  3. Click Add new channel and name it AI assistants. If your copy already lists Google's AI Assistant channel, edit that one instead.
  4. Click Add condition group, choose Source, set it to matches regex and paste the pattern. Add a second condition joined with OR, Medium exactly matches ai-assistant, so anything Google recognizes that your list misses still lands here.
  5. Click Save channel.
  6. Click Reorder, drag AI assistants above Referral and click Apply.
  7. Click Save group.

Order matters because GA4 puts each session in the first channel whose definition it matches, reading from the top. A Perplexity click, or a click from any assistant Google doesn't recognize, arrives with the medium referral. Referral's rule only checks for the medium referral, app or link. Leave your channel below it and Referral claims those sessions first, so AI assistants reports zero for them. Google's example places the channel above Referral and says it can go higher, above Organic Search, if needed. Keep it below the paid channels, so an ad you run on an AI platform with your own UTM tags still counts as paid.

A standard property gets two custom channel groups besides the default one, with up to 50 channels each. Don't spend one on a test.

To read it, open Reports > Acquisition > Traffic acquisition and pick your group from the dimension menu above the table. AI assistants appears as its own row next to Organic Search and Referral.

ChatGPT adds utm_source=chatgpt.com to the links it cites, and GA4 reads utm_source into the Source dimension. A tagged click shows chatgpt.com as its source even when no referrer comes with it, and the regex above matches that value either way. Don't assume the other assistants tag their links. Matching on source covers both cases.

A redirect rule that drops the query string strips the tag before GA4 loads, and the visit falls into Direct. Run a tagged URL such as https://example.com/pricing?utm_source=chatgpt.com through a redirect chain checker and confirm the last hop still carries the parameter.

What GA4 can't see about AI traffic

GA4 only counts visits that load your tag, so much of what AI does with your site never reaches it.

Answers with no click. An assistant can name your brand or cite your page and the reader never visits. GA4 records nothing. Measuring that takes sampled prompts, covered in how to check your AI visibility and share of voice in AI search.

Dark traffic. Some apps open links with no referrer and no tag, and those sessions land in Direct. Watch Direct sessions that land on deep pages such as a blog post or a docs page. Nobody types those URLs by hand, so a rise there after you start appearing in AI answers is a fair hint.

AI Overviews and AI Mode. Clicks from Google's AI features come from google.com and count as Organic Search, and the AI Assistant channel excludes them by definition. Search Console's Generative AI performance report, open to all sites since August 31, 2026, shows impressions for both combined, by page, country, device and date. It shows no clicks.

Crawlers and fetchers. GPTBot, OAI-SearchBot and ChatGPT-User request your pages from OpenAI's servers. ChatGPT-User is the one that reads a page live when someone asks ChatGPT a question, per OpenAI's crawler docs. Google says GA4 automatically excludes known bots and spiders, and a fetcher that doesn't run JavaScript never loads the tag anyway. Your server logs are the only record, which is what log file analysis for AI bots covers.

Copy the AI referral filters for GA4 and other tools

Our AI referrals guide has the filters from this post ready to paste. It lists the 14 assistants and their 16 hostnames, gives the GA4 source regex with each pattern kept under the 250-character limit, and walks through the channel group steps. It also has the same filter for other tools: a Looker Studio calculated field that relabels matching sources as AI Assistants and keeps the default channel for everything else, a Plausible Stats API query and a PostHog SQL query that match utm_source as well as the referrer, and a Matomo segment.

The guide needs no credits and no sign-up. It doesn't connect to or read your analytics. You paste the filters into your own property, then check the matched sources against what your reports show.

Keep reading