# How to track AI referral traffic (ChatGPT, Claude, Perplexity)

_2026-06-25 · agents, referrals, tracking_

When ChatGPT or Perplexity sends someone to your site, that visit usually lands in your "direct" bucket, unattributed and easy to miss. It is worth catching. On one B2B site, assistant-referred visits converted at 15.9 percent against 1.76 percent for search organic ([Seer Interactive](https://www.seerinteractive.com/), 2025), close to a nine-fold edge per visit. This guide shows the two signals that reveal an AI referral, why standard analytics drops them, and how to capture them server-side in a few minutes.

> **Key takeaways**
> - AI referrals are human visits that an assistant pointed at you. They convert far above search but hide in "direct" by default.
> - Two signals reveal them: the referrer host (such as `chatgpt.com`) and a `utm_source` tag. Capture either and the visit is attributable.
> - Browser analytics loses many of them because native assistant apps strip the referrer and headless steps run no script.
> - Server-side capture is the reliable fix. Caprail classifies the source from the raw request, before any browser code runs.

## What is AI referral traffic?

AI referral traffic is human visitors who clicked through to your site from an AI assistant's answer. They are people, not bots, but you only learn an assistant sent them by reading the referrer or a campaign tag. The reason to bother is intent: these visitors arrive after an assistant already vetted and recommended you, so they convert unusually well. One B2B site recorded 15.9 percent conversion from ChatGPT and 10.5 percent from Perplexity against 1.76 percent for search organic ([Seer Interactive](https://www.seerinteractive.com/), 2025).

The volume is still small relative to search, so read these as high-value rather than high-traffic. The point of tracking them is not to inflate a number. It is to know which assistants actually send you customers, so you can court the ones that do. For the wider picture of AI visitors, see [analytics for AI agents](/blog/analytics-for-ai-agents).

![A person reviewing data charts on a laptop beside printed reports, separating AI referral visits out of direct traffic.](/blog/how-to-track-ai-referral-traffic/analyzing-referrals.jpg)

## Why does your analytics file it under "direct"?

Because the clue it needs often never arrives in the browser. Standard analytics infers the source from the HTTP referrer, and two things erase it. When someone taps a link inside a native assistant app, the app frequently strips the referrer, so the visit shows up with no source. And when any step happens without a rendered browser, no client script fires to record it at all.

The result is a visit that looks like someone typed your URL from memory. It is filed under "direct," lumped together with bookmarks and dark-social, and the assistant that did the recommending gets no credit. You cannot optimize for a channel you have accidentally renamed "direct."

> **The fix in one line:** read the source on the server from the referrer host and the campaign tag, before anything can strip or skip it.

## The two signals that reveal an AI referral

There are exactly two, and capturing either one is enough to attribute the visit. The first is the referrer host: a click from a web assistant arrives with a referrer like `chatgpt.com` or `perplexity.ai`. The second is a `utm_source` tag, which survives even when the referrer is stripped, because it travels in the URL itself. Caprail maps both to a named AI source on the server.

The map below covers the major assistants, drawn from how Caprail classifies referrals:

| Assistant | Referrer host | utm_source tokens |
| --- | --- | --- |
| ChatGPT | chatgpt.com, chat.openai.com | chatgpt, openai |
| Claude | claude.ai | claude |
| Perplexity | perplexity.ai | perplexity |
| Gemini | gemini.google.com | gemini |
| Copilot | copilot.microsoft.com | copilot |
| Grok | grok.com, x.ai | grok |
| DeepSeek | chat.deepseek.com | deepseek |

One deliberate exclusion matters. Bare `google.com`, `bing.com`, and `duckduckgo.com` are not counted as AI referrals, because traffic from those hosts is indistinguishable from classic search and would pollute the numbers. Counting them would let "AI sent you visitors" quietly absorb ordinary search, which defeats the purpose.

![An abstract digital matrix of data streams, representing referrer and UTM signals captured server-side from AI assistant clicks.](/blog/how-to-track-ai-referral-traffic/referrer-signals.jpg)

## Step by step: capture AI referrals server-side

The reliable way to catch every referral is to read the source on the server, where the referrer and the URL both arrive intact. The whole process is five steps.

1. **Choose the server layer.** Pick the place every request passes through: your framework's middleware, or an edge worker in front of it. This is the one layer a referrer-stripping app or a scriptless step cannot bypass.
2. **Add the collector.** In a Next.js app it is two lines, and every request starts flowing:

```ts
import { createCaprailMiddleware } from "@caprail-dev/analytics/next";

export const middleware = createCaprailMiddleware();
```

3. **Verify in the live feed.** Open your site from an assistant's answer, or append `?utm_source=chatgpt` to a URL and visit it. Within seconds the request appears in the live feed, classified to its AI source rather than dropped into "direct."
4. **Read the referral breakdown.** Caprail groups attributed visits by assistant, so you can see which ones send people and which only crawl. The same view shows the share that arrived via a `utm` tag versus a raw referrer, which tells you how much native-app traffic you are recovering.
5. **Attribute the outcome.** Tie the referred visit to what happened next, a signup or a sale, so each assistant carries a conversion rate and not just a visit count. That is the number that decides where to spend effort.

Nothing here runs in your visitors' browsers, and nothing depends on them cooperating. The signal was always in the request; you are just reading it before it gets discarded. For how the same server layer also catches the machine side of AI traffic, see [the best new analytics tool](/blog/the-best-new-analytics-tool).

Watch on YouTube: [How to Track AI Traffic in GA4 and Ahrefs Web Analytics](https://www.youtube.com/watch?v=9TpyYFcAhmk) (Ahrefs, 2026).

## What our own first weeks showed

In our first two beta weeks, the referrals were real but tiny, and ChatGPT led them. Across the window we recorded 15 human visits that an assistant referred: 10 from ChatGPT, 3 from Perplexity, and 2 from Claude. Fifteen visits is not a conversion study. What it proves is that the attribution works, separating people an assistant sent from the direct traffic older tools would have merged.

> **What we saw:** the plumbing was in place before the volume was. The visits are few today, but each one is correctly named, so when the numbers grow the trend is already on record. That is the difference between starting to count now and discovering the channel later with no history.

The fuller version of this snapshot, including the crawler side, is in [our Q2 crawler share report](/blog/ai-crawler-share-q2-2026).

## Pitfalls and how to avoid them

A few traps catch people setting this up for the first time. None is hard to avoid once named.

- **Native-app referrer loss.** Clicks inside assistant apps often arrive with no referrer. Recover them by encouraging or adding `utm_source` tags where you can, since the tag rides in the URL and survives the strip.
- **Counting bots as referrals.** A live fetcher reading a page to answer a question is a machine, not a referred human. Keep the two separate, or your referral count inflates with crawler activity. Caprail classifies fetchers and referrals distinctly for this reason.
- **Folding search into AI.** Do not count bare `google.com` or `bing.com` as AI referrals. That traffic is ordinary search, and blending it in makes your AI numbers look bigger than they are and trust them less.

## FAQ

### Why does AI referral traffic show up as "direct"?

Because the source clue is missing. Native assistant apps often strip the HTTP referrer, and steps that run without a rendered browser fire no tracking script. With no referrer and no script, standard analytics has nothing to attribute, so the visit falls into "direct" alongside bookmarks and typed URLs.

### How do I track ChatGPT and Perplexity traffic specifically?

Read the referrer host and any `utm_source` tag on the server. A click from `chatgpt.com` or `perplexity.ai`, or a `utm_source=chatgpt` tag, identifies the source even when one signal is missing. Caprail maps these hosts and tokens to named assistants automatically on every request.

### Does AI referral traffic really convert better than search?

In published studies, yes, by a wide margin per visit. One B2B site saw 15.9 percent conversion from ChatGPT against 1.76 percent for search organic ([Seer Interactive](https://www.seerinteractive.com/), 2025), and Adobe reported AI-referred shoppers convert about 42 percent better ([Adobe](https://business.adobe.com/), 2026). Volume is small, so treat it as high-value rather than high-traffic.

### Can I track AI referrals without a browser script?

Yes, and it is more reliable. Server-side capture reads the referrer and URL before anything strips or skips them, so it catches referrals that a browser script never sees. A two-line middleware install starts recording every request, including the ones that land without a referrer.

### What is the difference between an AI referral and an AI crawler?

A referral is a human an assistant sent to your site. A crawler is a bot reading your pages directly, often in bulk. Tracking referrals tells you which assistants drive people and conversions; tracking crawlers tells you who is reading you. Both need server-side measurement, since browser tools see neither clearly.

## Conclusion

AI assistants are already sending you some of your best-converting visitors, and your dashboard is probably calling them "direct." The fix is not a new tag in the browser. It is reading the two signals that reveal an assistant, the referrer host and the campaign tag, on the server where both arrive intact.

Set it up once and the channel stops hiding. Add the middleware, send yourself a test click from an assistant, and watch the referral appear with a name attached. Caprail is free during the private beta, with no credit card required.

## Sources

- Seer Interactive, AI traffic conversion analysis, retrieved 2026-06-15, https://www.seerinteractive.com/
- Adobe, AI-referred retail traffic insights, retrieved 2026-06-15, https://business.adobe.com/
- Caprail first-party beta data, two sites, June 3 to 15, 2026, server-side request classification (aggregated, anonymized)
