# How to track visitors from ChatGPT, Perplexity and other AI assistants

The CrispStats team · Published 2026-11-16 · Updated 2026-11-29

**TL;DR:** AI traffic is two different things. People who click a link in an assistant's answer are ordinary visitors: you find them by referrer (chatgpt.com, perplexity.ai, claude.ai, gemini.google.com, copilot.microsoft.com) or by a utm_source the assistant added. Crawlers that fetch your pages for an AI company do not run JavaScript, so a tracking script never sees them: you need server or edge logs that match their user agents.

You track AI assistant visitors by referrer and UTM tag in your analytics, and AI crawlers in your server or edge logs, because they are different things. When an answer links to your site and someone clicks, that is a visit like any other. When the assistant's crawler reads your page to prepare the answer, that is not a visit at all. Most confusion about "AI traffic" comes from mixing the two.

## What counts as AI traffic?

- **AI referrals: humans.** A person reads an answer in ChatGPT, Perplexity, Claude, Gemini or Copilot, clicks a cited link and lands on your page in a normal browser. Your analytics script runs. See [AI referral](/glossary/ai-referral).
- **AI crawler hits: machines.** A program operated by an AI company requests your page over HTTP. No browser, no script, no visitor. See [AI crawler](/glossary/ai-crawler).

They need different tools, and they answer different questions. Keep them in separate reports.

## How do you identify visitors sent by an AI assistant?

### By referrer

When a click happens in an assistant's web app, the browser usually sends a [referrer](/glossary/referrer) with the assistant's hostname. These are the ones worth recognising:

| Assistant | Referrer hostname |
| --- | --- |
| ChatGPT | `chatgpt.com` (older links: `chat.openai.com`) |
| Perplexity | `perplexity.ai` |
| Claude | `claude.ai` |
| Gemini | `gemini.google.com` |
| Copilot | `copilot.microsoft.com` |

If your analytics tool has no AI channel, these visits are in your referral list, mixed in with blogs and directories. A filter on those hostnames gets you a first number.

### By UTM tag

Some assistants add a campaign tag to the links they cite. ChatGPT commonly appends `utm_source=chatgpt.com`. That tag survives even when the referrer does not, so check your [UTM](/glossary/utm-parameters) source report for assistant names as well. You cannot tag these links yourself, since you do not write them, but you can make sure your tool reads the tag when it is there.

To see how a given referrer and tag combination would be classified, paste it into the [traffic source classifier](/tools/traffic-source-classifier).

## Why does so much AI traffic show up as direct?

Because the referrer is often missing. Three common causes:

- **Native apps.** A link tapped in a desktop or mobile app opens in the system browser with no referrer. Unless the link carries a UTM tag, the visit is indistinguishable from someone typing your address.
- **Copy and paste.** People copy a URL, or just your product name, out of an answer and open it later.
- **No click at all.** The assistant recommends you by name, and the person searches for the brand or types the domain the next day. That arrives as [direct traffic](/glossary/direct-traffic) or branded search.

So the AI channel in any analytics tool is a floor, not a total. A practical cross-check: watch whether direct visits to deep pages (a specific docs article, an old blog post) rise alongside AI referrals. Few people type those URLs by hand.

## How do you see AI crawlers?

Not with a tracking script. Crawlers request the HTML and generally do not execute JavaScript, so anything that depends on a script in the page never fires. You need a record made on the server side: web server logs, CDN logs, or a few lines of code at the edge that look at the `User-Agent` header.

AI companies run several crawlers each, for different purposes. The purpose matters when you decide what to allow.

| User agent token | Operator | What it is for |
| --- | --- | --- |
| `GPTBot` | OpenAI | Collecting pages for model training |
| `OAI-SearchBot` | OpenAI | Indexing for search results inside ChatGPT |
| `ChatGPT-User` | OpenAI | Fetching a page because a user asked about it |
| `ClaudeBot` | Anthropic | Collecting pages for model training |
| `Claude-SearchBot` | Anthropic | Indexing for search |
| `Claude-User` | Anthropic | Fetching a page because a user asked about it |
| `PerplexityBot` | Perplexity | Indexing for Perplexity's answers |
| `Perplexity-User` | Perplexity | Fetching a page because a user asked about it |

A minimal edge check looks like this. It matches the user agent and records the path and status, nothing else:

```js
const AI_BOTS = ["GPTBot", "OAI-SearchBot", "ChatGPT-User", "ClaudeBot",
  "Claude-SearchBot", "Claude-User", "PerplexityBot", "Perplexity-User"];

export function aiBotName(request) {
  const ua = (request.headers.get("user-agent") || "").toLowerCase();
  return AI_BOTS.find((bot) => ua.includes(bot.toLowerCase())) ?? null;
}

// In your middleware or worker:
// const bot = aiBotName(request);
// if (bot) log({ bot, path: new URL(request.url).pathname, status: response.status });
```

> **User agents can be faked.** A user agent is a claim, not proof. Anyone can send a request that says GPTBot. For counting, the claim is good enough. For blocking or allowing, check the operator's published IP ranges as well.

## Training, search or user fetch: why the purpose matters

A **training** crawler takes your content to improve a model. It sends nothing back. A **search** crawler indexes your content so the assistant can cite and link to it, which is where referrals come from. A **user-triggered** fetch happens when someone pastes your URL into a chat or asks about your page: one request, on behalf of one person.

Many site owners treat these differently in `robots.txt`: allow search and user fetches, decide separately about training. What each block costs is set out in [should you block AI crawlers](/blog/should-you-block-ai-crawlers), and the [AI crawler checker](/tools/ai-crawler-checker) shows what a site's file allows today.

```txt
# Allow being cited in answers
User-agent: OAI-SearchBot
Allow: /

# Opt out of model training
User-agent: GPTBot
Disallow: /
```

`robots.txt` is a request, not an access control. Well-behaved crawlers follow it; your logs tell you whether a given one does.

## Does llms.txt help?

[llms.txt](/glossary/llms-txt) is a proposed convention: a Markdown file at `/llms.txt` that lists your most useful pages with one-line descriptions, so a language model can find the right content without crawling everything. It is cheap to publish and harmless.

It is also only a convention. No assistant has promised to read it, and the published log and citation studies found that AI retrieval bots rarely request it and that having one is not linked to being cited; [what is llms.txt](/blog/what-is-llms-txt) has the numbers. Treat it as tidy documentation for coding agents, and use your crawler logs to see whether anything requests it.

## What should you measure?

- **AI referrals over time**, as their own channel, next to organic search.
- **Landing pages from assistants.** They tend to be specific answers: docs, comparisons, how-to posts. That tells you what assistants find quotable.
- **Conversion rate and revenue per visitor for the AI channel.** A small channel can still be a valuable one. Compare it with search rather than judging it on volume.
- **Crawler hits by bot and by page**, split by purpose. A page that search crawlers fetch often but that receives no referrals may be answering the question so fully that nobody needs to click.
- **Crawler errors.** A 404 or 500 served to a search crawler is a citation you will not get.

## How CrispStats reports AI traffic

CrispStats has an [AI traffic](/features/ai-traffic) report with both halves. Visits whose referrer is a known assistant (ChatGPT, Perplexity, Claude, Gemini, Copilot and others), or whose `utm_source` names one, are filed under the "AI assistants" channel, with the pages they land on. Paid, email, affiliate and display tags take precedence, so an ad click is still counted as paid.

Crawler hits are reported from your own edge or middleware with a small server helper, because the script cannot see them. The helper sends only the user agent, the path and the status code: no IP address and no query string. Hits are grouped by bot, operator and purpose (training, search or user), and they are never counted as visitors. Setup is in the [AI crawler docs](https://docs.crispstats.com/ai/ai-crawlers).

## How do you keep crawler hits out of referral visits?

Report them as two rows that are never added together. A crawler hit is a request from a bot. A referral visit is a person who clicked, in a browser that ran your analytics script.

The script only runs for the person. GPTBot, OAI-SearchBot, PerplexityBot and the other tokens in the table above fetch HTML and generally do not run JavaScript, so they never become a session. A log pipeline that inserts those requests into the visits table turns machines into people.

|  | Crawler hit | Referral visit |
| --- | --- | --- |
| Who | A program, such as OAI-SearchBot or PerplexityBot | A person who clicked a link in an answer |
| Seen by | Server, CDN or edge log | Analytics script, via referrer or UTM tag |
| Counts as a visitor | No | Yes |
| Can carry a conversion | No | Yes, if that person converts |
| Usual mistake | Adding the hits to sessions | Calling the AI channel the whole of AI traffic |

Say a site has 1,000 sessions in a week. 80 of them are referral visits from ChatGPT and Perplexity. The edge log shows 4,000 requests from OAI-SearchBot and PerplexityBot. The traffic report has two lines: 80 AI referral visits, 8% of sessions, and 4,000 crawler hits. 4,080 is not a traffic number. None of those 4,000 requests ran the script.

## Which signal belongs to which assistant?

A referral needs a click that sends a referrer or a tag. A crawler token never becomes that click. The hostnames and tokens below are the lists from earlier in this guide, set side by side so a report does not merge them.

| Assistant | Counts as a referral visit | Counts as a crawler hit, never a visit |
| --- | --- | --- |
| ChatGPT | Referrer chatgpt.com or chat.openai.com, or utm_source=chatgpt.com | GPTBot, OAI-SearchBot, ChatGPT-User |
| Perplexity | Referrer perplexity.ai | PerplexityBot, Perplexity-User |
| Claude | Referrer claude.ai | ClaudeBot, Claude-SearchBot, Claude-User |
| Gemini | Referrer gemini.google.com | Googlebot is a Search crawl. A click from Google, including an AI Overview, stays in organic search |
| Copilot | Referrer copilot.microsoft.com | Bingbot crawls for Bing's index. A click from a Bing result stays in organic search |

Say the log shows 500 Googlebot requests, and analytics shows 30 visits from gemini.google.com plus 900 visits from Google. Report 30 AI referral visits and 500 crawler hits. Leave the 900 in organic search. [AI Overviews and website traffic](/blog/ai-overviews-and-website-traffic) explains why those Google clicks are not split out.

## Where are crawler policy and citations explained?

### How do you measure all three layers, not only the visits?

Crawler hits, referral visits and citations are three numbers from three places. A week of checks, with the crawler row kept out of sessions, is in [how to measure AI visibility](/blog/how-to-measure-ai-visibility). Search Console and Bing Webmaster Tools cover the citation row this analytics report cannot see.

### Should the crawlers in the log be blocked?

Block a training crawler only after you have a week of hits and referrals to compare. Blocking a search crawler removes the citations that send the referral row. [Should you block AI crawlers](/blog/should-you-block-ai-crawlers) prices each bot.

### How does a fetched page become a citation?

The search bot has to receive the page, the page has to be quotable, and other sites have to name you where answers look. A crawler hit alone is not a citation. [How to get cited by ChatGPT](/blog/how-to-get-cited-by-chatgpt) covers Perplexity, Gemini and Copilot, and why a pile of extra pages is the wrong next step.

## Frequently asked questions

### How do I see ChatGPT traffic in my analytics?

Look for visits with the referrer chatgpt.com (or the older chat.openai.com) and for visits tagged utm_source=chatgpt.com. Together they show clicks from ChatGPT's answers. Clicks from the native apps without a tag arrive with no referrer and are counted as direct.

### Can a JavaScript tracking script detect AI crawlers?

No. Crawlers such as GPTBot, ClaudeBot and PerplexityBot fetch the HTML and generally do not run JavaScript, so a script in the page never executes. Crawler hits have to be recorded on the server or at the edge by matching the user agent.

### Should I block AI crawlers?

It depends on which ones. Blocking training crawlers such as GPTBot keeps your content out of future model training and costs no visits today; blocking search crawlers or user-triggered fetchers removes you from the answers that send visitors. The full comparison, bot by bot, is in our guide to blocking AI crawlers.

### Is AI traffic the same as bot traffic?

Only the crawler half. A person who clicks a link in an assistant's answer is a human visitor and belongs in your normal reports under an AI channel. The crawler that read your page beforehand is a bot and should be counted separately, never as a visitor.

### Are AI crawler hits the same as visitors from ChatGPT?

No. A crawler hit is a request from a bot such as OAI-SearchBot, GPTBot or ChatGPT-User, recorded on the server. A visitor from ChatGPT is a person who clicked, with the referrer chatgpt.com or the tag utm_source=chatgpt.com. Add those people to your AI channel, and keep the bot requests in a separate count.

### Why would visitor counts jump after logging AI crawlers?

Because the log was written into the visits table. Crawlers do not run the analytics script, so they were never sessions. Keep the bot requests in their own report. The visitor total should change only when a person arrives.
