Skip to content

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.

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:

By referrer
AssistantReferrer hostname
ChatGPTchatgpt.com (older links: chat.openai.com)
Perplexityperplexity.ai
Claudeclaude.ai
Geminigemini.google.com
Copilotcopilot.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.

How do you see AI crawlers?
User agent tokenOperatorWhat it is for
GPTBotOpenAICollecting pages for model training
OAI-SearchBotOpenAIIndexing for search results inside ChatGPT
ChatGPT-UserOpenAIFetching a page because a user asked about it
ClaudeBotAnthropicCollecting pages for model training
Claude-SearchBotAnthropicIndexing for search
Claude-UserAnthropicFetching a page because a user asked about it
PerplexityBotPerplexityIndexing for Perplexity’s answers
Perplexity-UserPerplexityFetching 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.

Guide questions. Straight answers.

What people ask after reading this.

  • 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.

  • 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.

  • 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.

  • 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.

Not answered here? Write to hello@crispstats.com

Go further

Free tools

  • Traffic source classifier

    Paste a referrer or a tagged link and see the channel and source a visit is filed under, with the rule that decided it.

  • AI crawler checker

    Check whether a site's robots.txt lets GPTBot, ClaudeBot, PerplexityBot and other AI crawlers in, by training, search and user fetch, with the deciding rule.

  • llms.txt generator

    Build an llms.txt file in the llmstxt.org format: a name, a summary and sections of annotated links, checked as you type.

Use cases

  • CrispStats for indie hackers

    Traffic, revenue by source, uptime and errors for every side project in one dashboard.

  • CrispStats for bloggers

    See which posts get read to the end, where readers come from, including AI assistants, and keep your site free of analytics cookies.

  • CrispStats for developers

    A small cookieless script with web vitals and error tracking, an npm SDK, a REST API and an MCP server, so your analytics fits the way you work.

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.