Skip to main content

Cloudflare Analytics Connection Guide

Use a read-only API Token to see traffic and security right at the edge — before requests ever reach your server.

Sign up for free

Why connect Cloudflare to ClickSentinel?

If your website runs through Cloudflare, every request passes through Cloudflare's edge network before reaching your origin server. ClickSentinel reads this data via the GraphQL Analytics API to show real traffic, cache efficiency and blocked threats — a view Google Analytics simply doesn't have.

The connection uses a narrow-scoped API Token (Zone → Analytics → Read) that you create yourself on Cloudflare — not OAuth, since Cloudflare doesn't support OAuth for personal API access. Data is only available if the domain is actually running on Cloudflare's infrastructure (DNS proxy enabled).

  • Measured at the edge — catches traffic before it reaches your origin server
  • Track Cache Hit Ratio to see how much load is taken off your origin server
  • Threats Blocked directly supports ClickSentinel's own fraud detection
Advertisement

Key concepts

Requests & Page Views

Requests is the total number of HTTP requests Cloudflare handled; Page Views is the count of actual HTML page loads.

Cache Hit Ratio

The share of requests served from the Cloudflare cache instead of hitting the origin server — the higher, the lighter the load on your server.

Threats Blocked

Requests Cloudflare automatically blocked as suspected attacks or malicious bots — a useful cross-signal for fraud detection.

Zone ID vs API Token

The Zone ID identifies the correct domain to pull data for; the API Token is the authentication key — always create it with the minimum permission (read-only Analytics).

How it works

  1. 1Sign in to dash.cloudflare.com, pick the domain to connect, and copy the Zone ID from the Overview tab (a 32-character string).
  2. 2Go to My Profile → API Tokens → Create Token, and create one with the minimum "Zone → Analytics → Read" permission.
  3. 3Go to Cloudflare in ClickSentinel, pick a Site, paste the Zone ID and API Token, then click Connect.
  4. 4The system verifies the token before saving it; once connected, data syncs automatically every day at 3:25 AM.

Frequently asked questions

Does Cloudflare Analytics cost anything?
No. The core GraphQL Analytics API is available even on the Cloudflare Free plan, limited to daily granularity (no hourly/minute-level data).
What if my domain isn't on Cloudflare?
There will be no data to sync. This feature only works when the domain actually uses Cloudflare as its DNS/Proxy (the orange cloud).
Is the API Token safe?
The token is encrypted at rest inside ClickSentinel. You should create it with the minimum permission (read-only Analytics) and can revoke it at any time from the Cloudflare Dashboard.
Why are Cloudflare numbers higher than Google Analytics?
Cloudflare counts requests at the edge (before the page finishes loading), while GA4 only counts once the page has loaded and its JavaScript has run — so Cloudflare typically records more, including traffic from bots that never execute JS.