Cloudflare

Track AI agents with a Cloudflare Worker

A Worker in front of your site sees every AI agent that reads it — including the ones that got a 404. Works on any origin, with no change to the thing behind it.

Why you can't see them today

Cloudflare's own bot analytics tells you a bot came through. It doesn't tell you which pages the agent read, whether it found your llms.txt, or whether that visit turned into a signup. And if you're fronting a hosted platform, you have no other place to put instrumentation at all.

The reason there's no script tag to paste. AI agents don't execute JavaScript. Every analytics tool you already run is a browser tag, so it never fires for an agent — which is why your dashboards show none of this traffic. The only way to see it is server-side, at the edge, or in your logs.

See yours before you install anything

Paste a chunk of your access log and we'll pull out the AI agents that crawled you, what they read, and the files they asked for and couldn't find. No account, nothing stored.

Check my log free →

Install: Worker

No code required. Captures response status, so you also see the pages agents asked for and didn't get.

  1. Get a secret key. Sign up for Pickrate (free), then Settings → Your keys → create a secret (sk_) key.
  2. Deploy the Worker. Use the one-click deploy button on the template repo, or clone it:
    git clone https://github.com/pickrate-io/cloudflare-worker
    cd cloudflare-worker && npm install
    npx wrangler secret put PICKRATE_KEY
    npx wrangler deploy
  3. Route it at your site. Add a route in wrangler.jsonc for the hostname you want to measure, then deploy again. Your domain has to be on Cloudflare and proxied (orange cloud) for routes to work.
    "routes": [
      { "pattern": "docs.example.com/*", "zone_name": "example.com" }
    ]

Gotchas worth knowing first

Set the key as a secret, not a variable

Use `wrangler secret put PICKRATE_KEY`. A plaintext var in wrangler.jsonc ends up committed to your repo, and it's a key that can write to your workspace.

wrangler 4 needs @cloudflare/workers-types v5

Pin workers-types to v4 with wrangler 4 and npm install fails on a peer dependency conflict before you get anywhere. The template is already on the right versions; this is here for anyone building their own.

No key means no-op, on purpose

With PICKRATE_KEY unset the Worker is a transparent pass-through. You can deploy it, confirm your site still works, and add the secret afterwards — deploying it can't break anything.

What won't work

Shopify storefronts

Shopify terminates storefront traffic at its own edge and doesn't allow a third-party CDN in front, so a Worker never sees the request. Only server-rendered Hydrogen/Oxygen storefronts are reachable.

Questions

Will the Worker slow down my site?

No. It fetches your origin and returns that response first; the report to Pickrate goes out afterwards on waitUntil. And human traffic costs nothing at all — it classifies to null with no network call.

What happens if Pickrate is down?

Nothing your visitors can see. Reporting is fire-and-forget with a timeout, so a Pickrate outage or a wrong key can never become an error page on your site.

Can I use this in front of a site I don't own the code for?

Yes, that's the main reason it exists. Hosted docs, a no-code builder, a marketing site someone else maintains — if you control the DNS and it's proxied through Cloudflare, you can measure it without touching the origin.

Other setups

Agent-readable version: https://pickrate.io/install/cloudflare.md