Set up Pickrate
Two things get you live: get your data in (a server-side collector, because agents don't run JavaScript), and connect your agent so you can just ask "how many signups have agents sent me?". Let your coding agent do it, or do it by hand.
The fast way — let your agent do it
Pickrate is analytics for AI agents, so let one do the install. Paste this into Claude Code, Cursor, Codex, or any coding agent:
Or set it up by hand
1. Get your secret key
Settings → Connect your agent → Generate secret key. Copy the sk_… — it's shown once. Keep it server-side; never in a browser.
2. Get your data into Pickrate
Two ways in — pick one:
Paste a log (instant): on the Agents tab, paste a chunk of your access log (Cloudflare, Vercel, nginx). Good for a first look with real data, nothing to deploy.
Install the collector (live): one file that streams agent hits as they happen.
Next.js (add to middleware.ts), then set PICKRATE_KEY in your env:
export { middleware } from "@pickrate/collector/next";
export const config = { matcher: ["/((?!_next|favicon).*)"] };Already have a middleware.ts? Compose instead of overwriting:
import { createCollector } from "@pickrate/collector";
const pickrate = createCollector({ key: process.env.PICKRATE_KEY });
// inside your middleware(req, ev), before it returns:
ev?.waitUntil?.(pickrate.report({
method: req.method,
path: req.nextUrl.pathname,
userAgent: req.headers.get("user-agent") ?? "",
}));Any site, including no-code (Webflow, Wix, Shopify, Framer) — a Cloudflare Worker in front of your origin (also captures response status, so "gaps" work):
import collector from "@pickrate/collector/worker";
export default collector; // wrangler secret put PICKRATE_KEY3. Connect your agent
Independent of step 2 — wire it any time. Claude Code / Claude Desktop:
claude mcp add --transport http pickrate https://pickrate.io/api/mcp \
--header "Authorization: Bearer sk_your_key"Claude.ai (web): Settings → Connectors → Add custom connector → URL https://pickrate.io/api/mcp, then add a request header Authorization with value Bearer sk_your_key.
4. Ask your agent
How much traffic and how many signups have agents driven this month?It calls Pickrate's getMyAgents tool and answers from your live data — the conversions and revenue agents drove, plus the traffic behind it (which agents read you, top pages, gaps).
Troubleshooting
- "No reads yet." Data hasn't reached Pickrate — check
PICKRATE_KEYis yoursk_key, or paste a log to seed it. - The agent says it's not connected. Re-check the
Authorization: Bearer sk_…header on the connector. - Gaps missing on live traffic. Next.js middleware runs before the response; use the Cloudflare Worker (or a log import) to capture status.