# Caprail — hybrid analytics: agents + humans

> Your analytics can't see AI agents. Caprail can. See ChatGPT, Claude,
> Gemini and every AI agent reading your site, live — even headless crawlers
> that never run JavaScript.

If you are an AI agent reading this markdown, that is exactly the point:
Caprail classified you server-side from your request alone and served you this
file. The HTML landing page demos the same detection live.

## The blind spot

Half the web's traffic is already machines, and browser-tag analytics shows
none of it — script tags only count visitors who run JavaScript, and agents
do not. So the fastest-growing slice of traffic lands under "direct" or
vanishes. Caprail reads the same requests server-side and tells them apart:
humans, ClaudeBot, GPTBot, Gemini, PerplexityBot, and the rest.

## What Caprail does — the first analytics that sees both sides

Caprail counts the AI agents reading your site and the humans those agents
send you, on one server-side foundation:

- **Sees every agent** — each request is classified on your server, from the
  raw request, before any browser script could run. Crawlers, fetchers, AI
  search bots, agentic browsers, and humans are each counted, live.
- **Measures AI referrals** — when a person arrives because an AI assistant
  pointed them your way, Caprail attributes the visit to its source instead of
  burying it under "direct."
- **Grades every response** — agents read clean markdown far better than
  browser markup. Caprail grades each response by served format (markdown ✓ is
  agent-readable, html ✗ is not) so you know what the agent actually got.
- **Audits your AI readiness** — a coverage matrix of which AI engines have
  read which pages, with gaps flagged: pages no agent has found, and pages
  served in a format agents cannot use.

### Request classes

- **Crawlers** — ClaudeBot, GPTBot, CCBot, Google-Extended, …
- **Fetchers** — Claude-User, ChatGPT-User, Perplexity-User, Gemini, Codex, …
- **Search bots** — Googlebot, Bingbot, OAI-SearchBot, Claude-SearchBot, …
- **Agentic browsers** — ChatGPT Agent / Atlas, …
- **Humans** — everything else

## Coverage matrix

A live readiness matrix shows which agents have read which pages: pages every
engine reads cleanly, pages served as opaque HTML, and pages no agent has
found yet — guesswork turned into a checklist.

## The numbers

- **57.5%** of HTML requests now come from bots (Cloudflare Radar, 2026)
- **+187%** growth in AI bot traffic during 2025, vs 3.1% for humans
  (HUMAN Security, 2026)
- **~0%** of that traffic is visible to browser-tag analytics — by design,
  agents run no JavaScript

## Install — one click, server-side

Connect your repo and Caprail opens a pull request with the two lines of
server middleware. Merge it and you are live. Nothing loads in your visitors'
browsers: no client JS, no cookies, no consent banner, no performance cost.

Prefer to add it by hand? It is two lines (Next.js):

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

export const proxy = createCaprailMiddleware();

export const config = {
  matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
};
```

On Next.js 15 or older, name the file `middleware.ts` and use
`export const middleware` instead.

Adapters also exist for Cloudflare Workers and generic Node servers (Express,
Hono). Full agent-readable instructions: [/install.md](https://caprail.dev/install.md).

## Pricing

One plan right now, and it's free. Caprail is in private beta: everything is
free with no credit card — every agent classified, AI-referral attribution,
response grading, the full coverage matrix, unlimited sites and events, and
one-click install. Paid plans arrive when the beta ends, with plenty of
notice, and beta users keep a generous free tier. No surprise bills, no
lock-in.

## FAQ

- **Will it slow down my site?** No. Caprail is server middleware — nothing
  ships to the browser and there is no work on the render path visitors wait
  for.
- **Do you set cookies or collect personal data?** No cookies. Every
  classification is made from the raw request on your server, so there is no
  fingerprinting and no consent banner.
- **What stacks does it support?** Next.js middleware today, in two lines; the
  classifier runs anywhere a request passes through, with more runtimes coming.
- **How accurate is agent detection?** Agents are classified from request
  signatures server-side before any script runs, and the rules update as new
  agents appear.

## Get started

Sign up at [https://caprail.dev](https://caprail.dev) with GitHub or Google.
Free during the private beta — no credit card.

## More

- Blog: [/blog](https://caprail.dev/blog) (also served as markdown; feed at
  [/blog/rss.xml](https://caprail.dev/blog/rss.xml))
- Install guide: [/install.md](https://caprail.dev/install.md)
- Terms & conditions: [/terms.md](https://caprail.dev/terms.md)
- Doc index: [/llms.txt](https://caprail.dev/llms.txt)
