---
title: "AI traffic analytics: how to track ChatGPT and AI referrals in GA4"
description: Track ChatGPT, Perplexity and Gemini referrals in GA4, see why AI visits land in Direct, and measure the agent fetches GA4 never records.
canonical_url: https://rebilder.com/learn/track-ai-traffic
last_updated: "2026-11-15"
---

# [AI traffic analytics: how to track ChatGPT and AI referrals in GA4](https://rebilder.com/learn/track-ai-traffic)

> Track ChatGPT, Perplexity and Gemini referrals in GA4, see why AI visits land in Direct, and measure the agent fetches GA4 never records.

- **Updated:** 2026-11-15
- **Author:** Rebilder
- **Published:** 2026-11-15

AI traffic analytics measures two different things: people who click a link in ChatGPT, Perplexity, Gemini, Copilot or Claude and land on your site, and AI agents that fetch your pages themselves. GA4 tracks the clicks through its AI Assistant channel and a custom channel group you control; the fetches only show up in server-side data such as access logs, CDN bot analytics or an edge gateway, because a direct HTTP request never runs your analytics script.

This guide sets up both halves: the GA4 channel group, report and comparison for AI referrals, the reasons those numbers run low, and the server-side checks that show which agents read your pages and what they received.

## What AI traffic analytics measures: clicks and fetches

The phrase “AI traffic” covers two events that reach your site by different routes and are recorded by different systems. Treat them as two numbers from the start and every later report gets easier to read.

- **Referral clicks.** A person asks an assistant a question, the answer cites your page, and they click through. A real browser opens your page, your JavaScript runs, and GA4 records a session. ChatGPT adds `utm_source=chatgpt.com` to the links it shows in search results, and a referrer arrives whenever the app and browser pass one along.
- **Agent fetches.** The assistant itself requests your page: to build a search index (`OAI-SearchBot`, `PerplexityBot`, `Claude-SearchBot`), to collect training data (`GPTBot`, `ClaudeBot`), or to read a page live because a user just asked about it (`ChatGPT-User`, `Claude-User`, `Perplexity-User`). These are plain HTTP requests. No script executes, so no page tag fires and GA4 has nothing to count.

The fetch usually comes first: an assistant reads your pricing page, writes an answer, and some of its readers click. Fetches show what assistants know about you; clicks show what that knowledge earned.

## Can GA4 track ChatGPT traffic?

Yes, for the click half. GA4’s default channel group now includes an **AI Assistant** channel. When a session’s referrer matches Google’s list of recognized AI assistants, GA4 sets the medium to `ai-assistant`, the campaign to `(ai-assistant)` and the channel to AI Assistant, with no setup. Google names ChatGPT, Gemini, DeepSeek, Copilot and Grok as example sources, and its launch note also mentioned Claude.

Open **Reports → Acquisition → Traffic acquisition** and look for the AI Assistant row. Switch the primary dimension to **Session source / medium** to see each assistant separately, such as `chatgpt.com / ai-assistant`.

The built-in channel has three limits:

- Google does not publish the full list of referrers it recognizes, so you cannot confirm that every assistant your customers use is covered.
- The default channel group cannot be edited. A new assistant, or one Google leaves out, falls into Referral or Unassigned until Google adds it.
- It excludes Google’s own AI Overviews and AI Mode. GA4 counts those clicks as Organic Search, which the section on Google’s AI features covers below.

A custom channel group fixes the first two. You choose the domains, you see the rule, and you change it the day a new assistant starts sending visitors.

## How to track AI referral traffic in GA4: a custom channel group

You need the Editor role or higher on the GA4 property. Standard properties can hold 2 custom channel groups alongside the default, so this one is worth naming clearly.

1. In GA4, open **Admin**, then under **Data display** choose **Channel groups**.
2. Select **Create new channel group**. GA4 starts you from a copy of the default group, so every standard channel, including AI Assistant, is already there.
3. Name the group, for example `Channels with AI assistants`, and add a short description.
4. Choose **Add new channel** and name it `AI assistants`. Select **+ Add condition group**, set the condition to **Source** · **matches regex**, and paste the pattern below. Select **Save channel**.
5. Select **Reorder** and drag `AI assistants` above Referral and Organic Search, and above the built-in AI Assistant channel, then select **Apply**. GA4 assigns each session to the first channel whose rule it matches, so a channel sitting below Referral misses the visits Referral claims first.
6. Leave Google’s AI Assistant channel in place below yours as a catch-all. Anything Google recognizes that your regex does not will still land there, and any source you find in it belongs in your regex.
7. Select **Save group**. The new definition applies to existing data in reports and explorations as soon as it is saved.

GA4 condition: Source matches regex

```text
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|chat\.deepseek\.com|grok\.com|meta\.ai|chat\.mistral\.ai)$
```

The pattern is anchored with `^` and `$` and allows an optional subdomain, so `chatgpt.com` and `www.perplexity.ai` both match while `notchatgpt.com` does not. Both `copilot.microsoft.com` and `copilot.com` are listed because Microsoft’s consumer Copilot now redirects from the first to the second. Matching on **Source** rather than the referrer alone also catches visits that arrive with `utm_source=chatgpt.com`, because GA4 reads that parameter into the source.

> **Keep the list current** Check **Session source** in Traffic acquisition once a month for new hostnames that look like assistants, and add them to the regex. The rule is yours, so the update takes a minute.

## Build an AI traffic report and comparison in GA4

With the channel group saved, use it in a standard report first. In **Reports → Acquisition → Traffic acquisition**, open the primary dimension menu and choose your new channel group. The AI assistants row now sits beside Organic Search, Direct and Referral with the same engagement and key event columns, which is the comparison most teams want.

For page-level detail, build an exploration:

1. Open **Explore** and start a **Free form** exploration.
2. In the Variables column, add the dimensions **Session source / medium**, **Landing page + query string** and your custom channel group, and the metrics **Sessions**, **Engaged sessions** and **Key events**.
3. Drag **Landing page + query string** into Rows and the metrics into Values.
4. Add a filter on **Session source** with **matches regex** and the same pattern as the channel group, so the table shows only AI referrals.
5. Create a session segment with that same condition and a second segment for Organic Search, then apply both. A free-form exploration compares up to 4 segments side by side.

The result shows which pages assistants send people to, which assistant sends the most engaged visitors, and whether those sessions reach your key events as often as search visitors do. Pages with AI referrals but few key events usually need a clearer next step.

## Why ChatGPT traffic shows as direct, and other undercounts

Every GA4 number for AI referrals is a floor. These are the usual reasons a real AI visit lands somewhere else:

- **No referrer.** Desktop and mobile assistant apps, in-app browsers and strict referrer policies can open your page without a referrer. With no referrer and no UTM, GA4 files the session under **Direct**, the channel it uses for saved links and typed URLs.
- **Copy and paste.** A user who copies your URL out of an answer and pastes it into a new tab arrives as Direct. So does anyone who reads a recommendation and types your brand name into the address bar.
- **A search in between.** Someone reads about you in an assistant, then searches your name on Google. GA4 credits Organic Search, correctly, because that was the last click.
- **Lost UTM parameters.** A redirect that drops the query string, for example from a short link or a forced trailing slash, discards `utm_source=chatgpt.com` before your tag reads it. Check that your redirects preserve query strings.
- **Unrecognized sources.** An assistant outside Google’s list and outside your regex lands in Referral or Unassigned, where it is easy to overlook.

To identify LLM-referred traffic hiding in Direct, look at landing pages rather than channels. A surge of Direct sessions landing on a deep product or documentation page, the kind of URL nobody types, often lines up with the days an assistant started citing that page. Your server logs can confirm it: the same page will show a rise in `ChatGPT-User` or `Perplexity-User` fetches shortly before.

## Does Google Analytics show AI Overviews and AI Mode traffic?

Not separately. Google’s AI Overviews and AI Mode run on google.com, so a click from either arrives with a Google referrer and GA4 counts it as **Organic Search**. Google’s channel documentation says so directly, and the AI Assistant channel excludes both.

Search Console gives you more, in two places:

- The **Performance** report counts AI Overviews and AI Mode traffic inside the Web search type, as part of your overall search clicks and impressions. It does not split them out.
- The **Generative AI performance report** is the separate view. It shows how often links to your site appeared in AI Overviews and AI Mode, as impressions only, broken down by page, country, device and date, with both features combined.

Read those impressions by page next to Organic Search landing pages in GA4. Rising AI impressions with flat organic clicks means the page is shown in AI answers without earning the visit.

## How to see GPTBot and other AI agents in your logs

Agent fetches leave a line in your web server or CDN access log with the agent’s user-agent string. Each vendor documents its own: OpenAI lists `GPTBot`, `OAI-SearchBot` and `ChatGPT-User`; Anthropic lists `ClaudeBot`, `Claude-User` and `Claude-SearchBot`; Perplexity lists `PerplexityBot` and `Perplexity-User`. The full strings, with examples, are in our [AI agent user agents](/learn/ai-agent-user-agents) reference.

Count AI agent requests in an access log

```bash
# Requests per AI agent token (Nginx or Apache combined log format)
grep -oE 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User' \
  /var/log/nginx/access.log | sort | uniq -c | sort -rn

# The pages user-initiated fetchers asked for, most requested first
grep -E 'ChatGPT-User|Claude-User|Perplexity-User' /var/log/nginx/access.log \
  | awk '{print $7}' | sort | uniq -c | sort -rn | head -20

# Status codes AI agents received (a wall of 403s means a firewall rule is blocking them)
grep -E 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|PerplexityBot' /var/log/nginx/access.log \
  | awk '{print $9}' | sort | uniq -c | sort -rn
```

Answer three questions from the log: which agents visit, which pages they ask for, and what they got back. Each `ChatGPT-User` or `Perplexity-User` line is an assistant reading your page because someone just asked a question, so error responses to those agents are worth fixing first.

Behind a CDN, its bot reporting does the same work:

- **Cloudflare AI Crawl Control** shows AI crawler requests by crawler and operator, popular paths and status codes, with per-crawler allow or block settings. Paid plans add referral data.
- **Vercel Firewall** has an AI Bots managed ruleset with separate AI Crawlers and AI Assistants categories. Set either to **Log** to record that traffic on the Firewall overview without blocking it.

## How to identify real AI crawlers: a user agent is a claim

Any client can send `GPTBot` in its user-agent header, so a log line proves only that something claimed the name. For reporting, that is usually enough. Before you allow an agent through a firewall rule or treat its requests as evidence of real demand, check where it came from.

Fetch the published IP ranges

```bash
# OpenAI and Perplexity publish the IP ranges their agents use
curl -s https://openai.com/gptbot.json        | jq -r '.prefixes[].ipv4Prefix // empty'
curl -s https://openai.com/searchbot.json     | jq -r '.prefixes[].ipv4Prefix // empty'
curl -s https://openai.com/chatgpt-user.json  | jq -r '.prefixes[].ipv4Prefix // empty'
curl -s https://www.perplexity.ai/perplexitybot.json  | jq -r '.prefixes[].ipv4Prefix // empty'
curl -s https://www.perplexity.ai/perplexity-user.json | jq -r '.prefixes[].ipv4Prefix // empty'

# Then check whether the logged client IP falls inside one of those prefixes,
# for example with Python's ipaddress module or your CDN's IP list feature.
```

A request that names `ChatGPT-User` from an address outside OpenAI’s published ranges is not ChatGPT. Some agents go further and sign their requests with Web Bot Auth headers, which a server can verify cryptographically against the platform’s key. Our [classification docs](/docs/classification#verification) explain how that check works and why a parsed signature header and a verified one are different results.

## LLM traffic tracking methods compared

Most teams end up combining two or three of these. Pick by the question you need answered:

| Method | What it sees | What it misses | Effort |
| --- | --- | --- | --- |
| GA4 AI Assistant channel | Referral clicks from the assistants Google recognizes, with engagement and key events | Assistants outside Google’s list, referrer-less visits, AI Overviews and AI Mode, every agent fetch | None: it is on by default |
| GA4 custom channel group and exploration | Referral clicks from every domain in your regex, including `utm_source=chatgpt.com` visits, by landing page | Referrer-less visits that land in Direct, Google’s AI features, every agent fetch | Low: one setup, a monthly check of new sources |
| Search Console | AI Overviews and AI Mode impressions by page; their clicks inside overall Web results | Clicks from AI features as a separate number, other assistants, agent fetches | None once the property is verified |
| Server access logs | Every agent fetch by user agent, path and status code | Whether the agent was genuine without an IP or signature check; anything served from a CDN cache | Medium: log access and scripts |
| CDN bot analytics | AI crawler and assistant requests at the edge, including cached responses | What your origin returned in detail; referral clicks on most plans | Low if you already use that CDN |
| Rebilder gateway and Console | Classified agent fetches with platform, verification state and what was served; AI referrals on requests it handles | Requests that never pass through the gateway | Low: an adapter for your framework or platform |

## Where Rebilder fits in your AI traffic analytics

Rebilder’s gateway runs in front of your pages, on your own server or at the edge, and classifies every request it handles before your HTML pipeline runs. It checks for an `Accept: text/markdown` header, Web Bot Auth signatures, agent protocol routes and known user-agent tokens, in that order, and labels the request as an AI agent, a person, a crawler or a protocol client. Matching agents receive clean markdown built from your configured sources; search crawlers such as Googlebot always get your normal HTML. The [classification docs](/docs/classification) cover the full order.

Each handled request becomes an event in the Console. **AI visits** lists them with the claimed platform, whether that identity was verified, what was served and how long it took. The same event records the referrer and UTM source on visits from people, and on Insights, Pro and Agency the Funnel counts **Matched AI referrals**: visits an assistant sent to a page that the same assistant fetched earlier. That is the link between the two halves of this guide, in one place. The [events reference](/docs/events) lists every field.

For sites where the gateway does not see every pageview, Rebilder’s browser tag adds a count of initial pageviews with the cross-origin referrer classified by platform. It sets no cookies and sends nothing when Do Not Track or Global Privacy Control is on. Direct HTTP requests do not execute the tag, so the Console keeps tag pageviews and server-side request reporting as distinct measurements. Setup is one line, described in the [tag docs](/docs/tag).

The [ChatGPT traffic solution page](/solutions/chatgpt-traffic) shows how merchants use these reports to find the pages agents asked for and did not get.

## Can GA4 track ChatGPT traffic?

GA4 tracks people who click from ChatGPT to your site. Recognized AI assistant referrals get the medium `ai-assistant` and appear in the AI Assistant default channel, and ChatGPT adds `utm_source=chatgpt.com` to its search result links. GA4 cannot see ChatGPT fetching your pages, because those are server requests that never run JavaScript; use access logs or a server-side gateway for that half.

## Why does ChatGPT traffic show as direct in GA4?

A visit with no referrer and no UTM parameter is classified as Direct. That happens when the ChatGPT app or an in-app browser opens the link without a referrer, when a user copies and pastes the URL, or when a redirect strips the `utm_source=chatgpt.com` parameter. Look for Direct sessions landing on deep pages nobody would type to estimate how much AI traffic is hiding there.

## Does Google Analytics show AI Overviews or AI Mode traffic?

Not as a separate channel. Clicks from AI Overviews and AI Mode come from google.com, so GA4 reports them as Organic Search, and the AI Assistant channel excludes them. Search Console counts them inside the Web search type of the Performance report, and its Generative AI performance report shows AI Overviews and AI Mode impressions by page, without clicks.

## How do I see GPTBot in my analytics?

You will not find GPTBot in GA4 or any other JavaScript analytics, because it requests pages over plain HTTP and never runs your tag. Search your web server or CDN access logs for the `GPTBot` user-agent token, use your CDN’s bot reporting, or run a server-side gateway that classifies agent requests. Check the request IP against OpenAI’s published ranges before treating the claim as genuine.

## How do I identify LLM-referred traffic?

Match the session source against assistant domains such as `chatgpt.com`, `perplexity.ai`, `gemini.google.com`, `copilot.com` and `claude.ai`, and include the `ai-assistant` medium GA4 assigns automatically. A custom channel group with a source regex does both. For visits that arrive without a referrer, compare Direct landing pages with the pages assistants fetched in your server logs.

## What is the best LLM-referred traffic analytics tool?

Use GA4 for referral clicks, because it already holds your engagement and key event data, and add a server-side source for agent fetches. Server logs and CDN bot analytics show raw requests; a gateway such as Rebilder’s classifies each request, records what it was served, and matches later referrals to the pages the same assistant fetched.

## Is AI traffic counted as referral traffic in GA4?

Recognized AI assistants now have their own AI Assistant channel instead of Referral. Assistants outside Google’s list can still land in Referral or Unassigned. A custom channel group with an AI channel placed above Referral moves them into one channel you control.

## Related

- [AI agent user agents: a field guide](https://rebilder.com/learn/ai-agent-user-agents)
- [ClaudeBot](https://rebilder.com/learn/claudebot)
- [PerplexityBot](https://rebilder.com/learn/perplexitybot)
- [How to get recommended by ChatGPT](https://rebilder.com/learn/get-recommended-by-chatgpt)
- [How agent detection works](https://rebilder.com/docs/classification)
- [Event fields reference](https://rebilder.com/docs/events)
- [The browser tag](https://rebilder.com/docs/tag)
- [Which agents Rebilder detects](https://rebilder.com/help/agent-traffic/which-agents-detected)
- [AI visits in the Console](https://rebilder.com/help/console/console-visits)