Measure AI agents at the Cloudflare edge with a single Worker. Works on the free plan.
A Cloudflare Worker sits in front of your site and reports every agent request
to Rankly, then passes the request through untouched. It works on the free
Cloudflare plan and takes about three minutes.
Prerequisites. Your domain is on Cloudflare (active zone), and you have
verified it in Rankly. Your ingest token is in
Settings and is already baked into the script Rankly generates for you.
In the Cloudflare dashboard, go to Workers & Pages -> Create -> Create
Worker. Give it a name like rankly-agent-analytics.
2
Paste the Worker script
Replace the default code with the script below. Rankly generates this for you
with your ingest token already filled in; the version here shows the shape.
Open your domain’s zone, go to Workers Routes, and add routes so the
Worker runs on your whole site:
yourdomain.com/*www.yourdomain.com/*
4
Send a test request
curl -A "GPTBot/1.0" https://www.yourdomain.com/
Your first event appears in the dashboard within a minute.
The Worker captures the real client IP (cf-connecting-ip) and Web Bot
Auth signatures at the edge, so IP verification and signed-request checks work
out of the box.