Home/Documentation

Bot Analytics

Monitor which AI crawlers, search bots, and automated agents visit your site. Bot Analytics tracks server-side bot visits at the Cloudflare edge — separate from your human traffic stats.

Requirements

Your website must use Cloudflare as its DNS/proxy provider. Bot Analytics deploys a Cloudflare Worker on your zone to detect and record bot visits — no code changes on your site are required.

What it shows

  • Bot trend chart — daily bot visits over your selected period
  • Platform breakdown — which bots visit most (GPTBot, ClaudeBot, Googlebot, etc.)
  • Top pages — which URLs bots crawl most frequently
  • Path detail — drill into a specific URL to see bot activity over time
  • Heatmap — visualise bot crawl patterns across your site structure

How to set up

  1. Go to your site's Settings → Bot Analytics.
  2. Create a Cloudflare API token (see below).
  3. Click Connect Cloudflare, paste the token, and confirm.
  4. Once connected, bot visits appear on the Bot Analytics page within minutes.

Create a Cloudflare API token

You need a custom API token with specific permissions. Follow Cloudflare's official guide or the steps below.

Step 1 — Open API Tokens

Go to the Cloudflare API Tokens page (My Profile → API Tokens in the Cloudflare dashboard).

Step 2 — Create a custom token

  1. Click Create Token.
  2. Choose Create Custom Token (not a template).
  3. Name the token, e.g. Open Analytics Bot Tracking.

Step 3 — Set permissions

Add these three permissions — Open Analytics needs them to deploy the bot worker:

GroupPermissionAccess
AccountWorkers ScriptsEdit
ZoneWorkers RoutesEdit
ZoneZoneRead

Step 4 — Select resources

  • Under Zone Resources, include the zone for your website (e.g. example.com).
  • Under Account Resources, include the account that owns that zone.

Tip

Limiting resources to your specific zone and account is recommended. The token will only be able to act on those resources.

Step 5 — Create and copy the token

  1. (Optional) Add client IP filtering or a TTL under advanced options.
  2. Click Continue to summary, review the permissions, then click Create Token.
  3. Copy the token secret immediately — Cloudflare only shows it once. New tokens use the cfut_ prefixed format.

Note

The token secret is only shown once. Do not store it in plaintext where others can access it. Anyone with this token can perform the authorized actions against the resources it has access to.

Step 6 — Verify the token (optional)

Cloudflare recommends verifying your token after creation:

curl "https://api.cloudflare.com/client/v4/user/tokens/verify" \
  --header "Authorization: Bearer <API_TOKEN>"

A successful response includes "status": "active". See the full documentation for details.

Step 7 — Connect in Open Analytics

  1. Go to Settings → Bot Analytics for your site.
  2. Click Connect Cloudflare.
  3. Paste the API token and click Connect.

Open Analytics uses the token once to deploy the worker and set up routes — it is not stored.

What happens when you connect

Open Analytics will:

  1. Find the Cloudflare zone matching your site domain
  2. Deploy the Open Analytics bot tracking Worker
  3. Set up routes to run on all requests to your domain
  4. Send a test bot request to verify tracking is working

Tip

Bot Analytics is separate from the main tracking script. Human pageviews are tracked by tracker.js; bot visits are detected server-side by the Cloudflare Worker at the edge.

Pausing bot tracking

You can pause bot tracking from Settings → Bot Analytics without disconnecting your Cloudflare integration. Paused periods are not counted in your stats.

See Troubleshooting if bot visits are not appearing after setup.