See AI assistants reading your site (Cloudflare)¶
AI assistants such as ChatGPT, Claude and Perplexity read your pages to answer people's questions. They download the page without running its scripts, so Google Analytics and the Rose widget never see them. If your site runs through Cloudflare, a small Rose Worker can tell Rose which pages assistants read and what your site answered them. The Rose team shares the results with you, next to the assistant reads of your Rose FAQ page. Requests a Cloudflare security rule blocks before the Worker runs are not seen: check those in Security → Events.
What the Worker sends, and what it doesn't¶
- Sent, only for page reads whose user agent names an AI agent (ChatGPT-User, ClaudeBot…): the page address, that user agent, the IP address (used to check that it is really that agent, then dropped) and the status your site answered (200, 404…).
- Never sent: anything about your visitors. Requests from browsers pass through untouched. Only someone who sets their browser to pretend to be an AI agent would be reported, under that agent's name.
- Your site doesn't change: the Worker never reads or modifies your pages, and if Rose is slow or unreachable your visitors see no difference.
Before you start¶
- Your domain is on Cloudflare (its traffic goes through Cloudflare's proxy).
- The Rose team has sent you two things: the Worker file
rose-agent-worker.jsand a key starting withrak_. Keep the key private. - The Worker runs on every request to your site. The free Workers plan allows 100,000 requests a day; above that, use Workers Paid or set the route to fail open (step 4), so your site is never blocked.
Install¶
First open your domain's Workers Routes and look at every route on example.com and
www.example.com. If a Worker already handles one of them (your site's own code, or a path
such as /faq*), don't replace it: ask the Rose team, who will add the reporting to that
Worker instead. Pages a more specific route serves are not counted otherwise.
- In the Cloudflare dashboard, open Workers & Pages → Create → Worker. Name it
rose-agent-analyticsand deploy the starter Worker. - Open Edit code, replace everything with the contents of
rose-agent-worker.js, and deploy. - In the Worker's Settings → Variables and Secrets, add a secret named
ROSE_AGENT_KEYwith yourrak_key. Optional: a text variableSKIP_PATHSwith path prefixes never to report, separated by commas (for example/checkout,/account). - Open your domain, then Workers Routes → Add route:
- Route:
example.com/*, and a second one forwww.example.com/*if you usewww. - Worker:
rose-agent-analytics. - Request limit failure mode: Fail open (proceed).
- Route:
- Tell the Rose team it is installed. We confirm the first assistant reads, usually within a day.
Remove it¶
Delete the two routes in Workers Routes, then the Worker. Ask the Rose team to revoke your key.