Use the Cloudflare Worker collector when the monitored site is proxied through Cloudflare but Cloudflare Logpush is not the selected delivery source. The Worker filters known AI crawler User-Agents, forwards the request to the origin, and reports eligible page responses to Qwairy.
Use the Cloudflare Worker key created by this setup. A Cloudflare Logpush or Generic HTTP key belongs to a different provider contract and is rejected or discarded by this endpoint.
Before you start
You need:
- access to Measure > Crawler Analytics > Settings for the brand;
- a Cloudflare Worker attached to the hostname configured for that brand;
- permission to create an encrypted Worker secret and attach a production route;
- a test page that returns
text/html or text/plain.
Only activate one delivery source for a brand. Running this Worker alongside another active collector can duplicate observations.
Create and protect the key
- In Crawler Analytics settings, select Cloudflare Worker.
- Select Create Key.
- Enter a descriptive name and the IANA time zone used for daily analytics.
- Copy the plaintext secret when it appears. Qwairy shows only its prefix later.
- Store it as the encrypted Worker secret
QWAIRY_API_KEY.
Do not put the key in Worker source, ordinary environment variables, request URLs, browser code, or logs. Leave QWAIRY_ENDPOINT unset unless Qwairy explicitly gives you a different endpoint.
Deploy the generated Worker
Create worker.js with the recipe generated by the current Qwairy setup:
Then:
- Paste the recipe into the Worker.
- Add
QWAIRY_API_KEY as an encrypted secret with the one-time Qwairy value.
- Attach the Worker to the exact production route to monitor, such as
www.example.com/*.
- Deploy the Worker and confirm normal requests still receive the origin response.
The generated recipe sends only the path, not the query string. Review your path design and add exclusions in Qwairy if path segments can contain sensitive identifiers.
Verify delivery
Use a dedicated page that returns HTML and replace the example hostname. This synthetic request creates a crawler observation in the current analytic day:
- Confirm the command returns the expected origin status.
- In Qwairy, wait for the connector to move from pending to connected after the accepted event reaches a daily rollup.
- Open the current analytic day and look for
/docs/qwairy-collector-check.
- If the connector stays pending, inspect Worker logs for
Qwairy: Failed to send log, then confirm the route, secret, hostname, User-Agent, and response content type.
An origin response alone proves only that the Worker proxy path works. It does not prove that Qwairy accepted and rolled up the event.
Limits and behavior
- The recipe reports only matching User-Agents on non-ignored paths whose origin response is
text/html or text/plain.
- The recipe can attempt delivery for other HTTP methods, but Qwairy accepts only
GET and HEAD records for aggregation.
- Static file extensions,
/api/, /dashboard/, /_next/, and /favicon paths are ignored by the generated code.
- The Worker sends one Qwairy request per matching origin response. It has no delivery queue or retry loop, so network failures can create gaps.
- The integration route allows a burst of 120 ingestion requests per minute. The route can acknowledge over-limit Worker deliveries without aggregating them, so check coverage warnings after traffic spikes.
- Qwairy applies its maintained crawler registry, hostname checks, exclusions, late-arrival window, and ingestion ceilings after receipt.
- The shared technical ceilings are 10,000,000 events per integration per day and 200,000,000 events per billed team per day.
- The collector observes requests. It does not prove indexing, model training, or citation use.
Rotate or roll back
To rotate the key, create a replacement in Qwairy, update the encrypted Worker secret, deploy, verify a new accepted observation, and then delete the previous key.
To roll back the collector:
- Detach the Worker route or disable the Worker deployment.
- Confirm the origin still serves normal traffic and no new Worker observations arrive.
- Remove the Worker secret.
- Revoke the corresponding Qwairy key.
Disabling delivery creates an analytics coverage gap. Check delivery-continuity warnings before comparing periods that cross the rollback.
Related pages