Cloudflare Logpush
Send your zone's HTTP request logs to Rankealo. Nothing runs on your site, and every crawler request is counted, including cached ones and search crawlers.
Cloudflare Enterprise only
Logpush for HTTP requests is available on Enterprise zones. On any other plan, use the Cloudflare Worker instead.Prerequisites#
- An Enterprise zone on Cloudflare.
- A Cloudflare API token with Logs: Edit permission on the zone, and the zone id (on the zone's Overview page).
- The URL shown in Rankealo → Traffic → Agent Analytics in the app. It carries your site key, so you paste it into your host's dashboard yourself; it never appears in these docs or in the "Copy for Agent" prompt.
Steps#
- 1
Copy the destination URL
In Rankealo, open Traffic → Agent Analytics, pick Cloudflare Logpush, and copy the Destination URL. Logpush cannot always send an Authorization header, so this URL carries your site key as a?token=query parameter. Because it contains your key, it is only shown there, never in these docs or in the "Copy for Agent" prompt. - 2
Create the Logpush job
Run the command below with your zone id, API token, and hostname, and paste the Destination URL in place ofPASTE_THE_DESTINATION_URL_FROM_RANKEALO. It creates anhttp_requestsjob that sends NDJSON with only the fields Rankealo needs, filtered to your hostname. You can also create it in the dashboard under Analytics & Logs → Logpush → HTTP destination using the same URL and fields. - 3
Wait for validation
Cloudflare first sends a small test file. The endpoint accepts it and the job is created. Batches then arrive every few minutes.
# destination_conf: paste the Destination URL shown in Rankealo → Traffic → Agent Analytics.
# It contains your site key: paste it yourself and keep this command out of version control.
curl -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/logpush/jobs" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"name": "rankealo-bot-traffic",
"dataset": "http_requests",
"destination_conf": "PASTE_THE_DESTINATION_URL_FROM_RANKEALO",
"output_options": {
"output_type": "ndjson",
"field_names": [
"ClientRequestMethod",
"ClientRequestHost",
"ClientRequestURI",
"ClientRequestUserAgent",
"ClientIP",
"EdgeResponseStatus",
"EdgeStartTimestamp"
]
},
"filter": "{\"where\":{\"and\":[{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"www.your-site.com\"}]}}",
"max_upload_records": 1000,
"enabled": true
}'
Fields sent#
- ClientRequestMethodOnly GET and HEAD are kept.
- ClientRequestHostMust belong to your site.
- ClientRequestURIPath; the query string is dropped.
- ClientRequestUserAgentIdentifies the crawler.
- ClientIPHashed on arrival, never stored raw.
- EdgeResponseStatusStatus code Cloudflare returned.
- EdgeStartTimestampWhen the request happened.
Batches may be gzip-compressed; Rankealo decompresses them. Humans and unknown user agents are dropped before anything is stored, and raw log lines are not kept.
Limitations#
- Enterprise zones only.
- Very large batches may be truncated. The job above caps batches at 1,000 log lines (
max_upload_records), which keeps normal traffic well inside the limit. - The key sits in the destination URL, so treat the Logpush job config like a secret. If it leaks, press Regenerate key in Agent Analytics Setup (the old key stops working at once) and update the job with the new URL.
- Hits are marked as claimed identities; Logpush does not forward Cloudflare's verified-bot flag in this setup.
Confirm data is flowing#
- 1In Rankealo, open Traffic → Agent Analytics.
- 2Press Check now in step 3. Once a crawler has visited, it shows Receiving data with the time of the last hit.
- 3Open the Bot traffic tab to see hits by crawler and by page.
The first hit depends on when a crawler next visits, which can take up to 24 hours. To test right away, request a page with a crawler user agent, for example curl -A "GPTBot/1.2" https://www.your-site.com/, then press Check now. A test like this is recorded as a claimed identity, like any hit without CDN verification.
Troubleshooting#
Job creation fails validation+
Job runs but nothing shows up+
Some hits are skipped+
Still stuck? Contact support
