AI search
How to track visitors from ChatGPT, Perplexity and other AI assistants
How to see visits sent by AI assistants: the referrers and UTM tags to look for, why much of it shows as direct, and how to log AI crawlers.
The CrispStats team · · Updated · 7 min read
In short
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.
On this page · 8 sections
Sections
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.
- 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.
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 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 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.
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 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:
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 });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, and the AI crawler checker shows what a site’s file allows today.
# Allow being cited in answersUser-agent: OAI-SearchBotAllow: /# Opt out of model trainingUser-agent: GPTBotDisallow: /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 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 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 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.