Install · runtime
The agent on Cloudflare Workers
At the serving layer. Connect traffic measurement in the Worker serving your domain.
How it works on Cloudflare Workers
Connect traffic measurement in the Worker serving your domain. Requests for public pages can then be recorded before reaching the origin.
The file
worker.js — Your Worker, on a route covering the whole site.
import { reflexa } from './reflexa-agent.js'
const agent = reflexa({ token: REFLEXA_TOKEN })
export default {
fetch: (request, env, ctx) =>
agent.handle(request, ctx, () => fetch(request)).catch(() => fetch(request)),
}Get reflexa-agent.js and the site's token from the dashboard's Agent page, put the token in REFLEXA_TOKEN, deploy. Then press Check the connection in the dashboard: it fetches the domain proof from your real domain and the agent is live.
What you can measure
- records AI crawler requests and referrals by page
- verifies the site connection using the domain proof
Go deeper on reflexatechnologies.com: the Cloudflare Workers guide · check your site's AI crawler access first (free)

Questions people ask
Do I need to connect my site for the first check?
A public URL is enough for the external diagnosis. A supported site connection adds AI request and referral data.
Can I take it out?
Remove the integration from the runtime and redeploy to stop reporting new traffic. Your saved reports remain in the dashboard.
Which data does this connection add?
Records AI crawler requests and referrals by page. Verifies the site connection using the domain proof.
Is the token a secret?
Yes. It belongs to this one site and should live in an environment variable, never in a file you commit. It grants nothing beyond this site, and the domain proof refuses it from any other host.
Find your next search opportunity.
Get your free report with 40+ checks. See which pages need attention, why they matter and where to start.
Create a free account in the next step for the full diagnosis.