Install

Get your agent traffic into Pickrate

Four ways in. Pick the one that matches who you are and what you can change — they all feed the same report.

Why there's no script tag. AI agents don't execute JavaScript. A browser snippet never fires for them, which is why your current analytics shows none of this traffic. Every install below is server-side, at the edge, or from logs.

Looking for a walkthrough for your specific stack? The install guides cover Vercel, Cloudflare, Mintlify, and Next.js one at a time, with the platform-specific gotchas. This page is the reference for all of them.

Which one?

YouInstallCode?Sees status
Just want to see something nowPaste an access logNoYes
On VercelLog drainNoYes
Hosted docs, no-code, or no repoCloudflare WorkerNoYes
Can edit the appFramework middlewareOne lineNo

Paste an access log

The zero-commitment start. Copy a chunk of your access log into Setup and Pickrate classifies it on the spot — Cloudflare, Vercel, and nginx formats all work. Nothing to install, and you find out whether agents are reading you before deciding how to wire it up permanently.

Vercel log drain — no code

The best install if you're on Vercel. Vercel streams request logs straight to Pickrate: no middleware, no deploy, no repo access, and it captures the response status so the Gaps view works. Works for every framework on Vercel at once.

  1. In Setup, create your drain URL and copy it.
  2. In Vercel: Project → Settings → Log Drains → Add. Paste the URL, choose sources static, lambda, and edge.
  3. Vercel shows a verification value. Paste it back into Setup first — Vercel won't save the drain until our endpoint echoes your team's value.
  4. Leave sampling at 100%, or your read counts will be a fraction of reality.

Requires a Vercel Pro or Enterprise plan — log drains aren't available on Hobby. On Hobby, use the middleware below.

Cloudflare Worker — in front of anything

Put Pickrate in front of any origin, with no change to the thing behind it. This is the install for hosted documentation, no-code builders, and any site whose repo you don't control. Like the log drain, it sees the completed response, so 404s on agent surfaces show up as gaps.

git clone https://github.com/pickrate-io/cloudflare-worker
cd cloudflare-worker && npm install
npx wrangler secret put PICKRATE_KEY   # your sk_ key
npx wrangler deploy

Then add a route in wrangler.jsonc pointing at your hostname and deploy again. One-click deploy and the full guide are in the template repo. With no key set the Worker is a transparent pass-through, so deploying it before you add the secret can't break your site.

Hosted documentation

Docs are where agent traffic concentrates — it's what agents actually read when deciding whether to recommend your tool, and it's usually the part of your site you can't instrument. Point the custom domain at your docs host through Cloudflare (proxied), then route the Worker at it.

Mintlify needs two Cloudflare settings for certificates to provision: SSL/TLS mode Full (strict), and Always Use HTTPS off. Its pre-validation flow doesn't work through a Cloudflare proxy — set the CNAME to cname.mintlify.builders and continue without waiting for the TXT records. GitBook, ReadMe, and Docusaurus need no platform-specific settings.

Framework middleware

One line, if you can edit the app.

// middleware.ts
export { middleware } from "@pickrate/collector/next";
export const config = { matcher: ["/((?!_next|favicon).*)"] };

Set PICKRATE_KEY to a secret (sk_) key from Settings. Middleware runs before the response, so it can't record status codes — everything else is identical. Source: @pickrate/collector (MIT, dependency-free).

What won't work

FAQ

Why can't I just paste a script tag?

AI agents don't execute JavaScript. A browser tag — Google Tag Manager, a <script> snippet, any client-side analytics — never fires for them, so it sees none of this traffic. That's exactly why your existing analytics shows nothing. The interception has to happen server-side, at the edge, or in your logs.

Which install should I pick?

On Vercel, use a log drain: no code, no deploy, and it captures response status. On any other host, if you can edit the app, use the framework middleware. If you can't — hosted docs, a no-code builder, someone else's repo — put the Cloudflare Worker in front. Pasting an access log is the fastest way to see something before you commit to any of them.

Why does the log drain see 404s when middleware doesn't?

Middleware runs before the response is generated, so there's no status code to read yet. A log line and a Cloudflare Worker both see the completed response. That's what powers the Gaps view — an agent asked for /llms.txt and got a 404 is a fixable problem you'd otherwise never learn about.

Does the collector slow down my site?

No. Human requests classify to null with no network call at all. Agent requests report fire-and-forget on waitUntil, after the response has been returned. A Pickrate outage or a wrong key can never become an error page for your visitors.

Can I measure a Shopify storefront?

Not with an edge install. Shopify terminates storefront traffic at its own edge and doesn't allow a third-party CDN in front, so a Cloudflare Worker never sees the request. Server-rendered Hydrogen/Oxygen storefronts are reachable; standard Liquid storefronts are not.

Agent-readable version of this page: https://pickrate.io/docs/collector.md