Ranketta
Integrations

Cloudflare Integration

Cloudflare Workers let you track AI bot visits at the edge, before requests reach your servers.

Why use Cloudflare Workers?

  • Edge tracking: Track AI bots at Cloudflare's edge before they reach your origin
  • Real-time detection: Identify AI bots quickly using user agent and referer analysis
  • No impact on performance: Tracking happens asynchronously without blocking requests
  • Comprehensive coverage: Track all AI bot visits, not just those that reach your server

Prerequisites

  • A Cloudflare account
  • Your website added to Cloudflare
  • Access to Cloudflare Workers & Pages
  • A Ranketta account

Setting up Cloudflare Workers

  1. Go to Traffic in your Ranketta dashboard
  2. Click Set up Cloudflare tracking
  3. Your unique Site ID will be generated automatically
  4. Copy the Site ID for the Worker code

Then in Cloudflare:

  1. Log in to your Cloudflare dashboard
  2. Go to Workers & Pages
  3. Create a new Worker
  4. Replace the default code with the Worker code provided by Ranketta (includes your Site ID and AI bot detection)
  5. Add a route for your domain (e.g., example.com/*)

How it works

The Worker detects AI bots via user agent strings (GPTBot, ClaudeBot, PerplexityBot, etc.) and referer headers. It intercepts requests, analyzes them, sends tracking data to Ranketta asynchronously, and forwards the original request to your origin.

Viewing Tracked Data

Go to Traffic in Ranketta to see real-time AI bot visits, breakdown by platform, and geographic distribution.

Copyright © 2026