Browse docs
Sprid docs

Connect Cloudflare (optional)

Read traffic reports for your website.

Before you start

Access to your domain’s Cloudflare account and permission to create a token. Enable Web Analytics for visitor reports; basic request counts include bots.

Set it up

  1. Open Cloudflare → profile icon → My Profile → API Tokens.
  2. Create Token → Custom token → Get started, named Sprid.
  3. Permissions:
    • Zone → Analytics → Read
    • Account → Account Analytics → Read
  4. Zone Resources → Include → Specific zone: your domain.
  5. Account Resources → Include: your account.
  6. Leave Client IP Address Filtering and TTL empty. Continue to summary → Create Token.
  7. Copy the token and leave it on your clipboard. It is shown once.

For a connection that survives you leaving the team, create an account-owned token instead under Manage Account → Account API Tokens, with the same permissions.

Zone id

Your domain → Overview → API card: copy Zone ID and Account ID. The Zone ID goes in the command; ask your agent to save the Account ID in your Sprid app profile.

Connect to Sprid

Run in your terminal
sprid connect cloudflare --key-from-clipboard --zone 0123456789abcdef0123456789abcdef

Use your own Zone ID. Keep the token out of chat.

Sprid reads the token from your clipboard, saves it and clears the clipboard, so it never shows on screen or lands in a file. Working with an agent? Tell it the token is copied and it runs this for you. Typing it yourself, copy the token last: paste the command into your terminal first, then copy the token, then press Enter. If the clipboard still holds the command, Sprid refuses it; copy the token and run it again. Without clipboard access (a remote shell), save the token to a file and pass --token <file> instead.

Check the connection

Run sprid status, then ask your agent: “Check that Sprid can read recent Cloudflare traffic for this domain.” The check names the domain and says whether visitor reports or only request counts are available.

If something goes wrong
  • Access denied: API Tokens → ⋯ → Edit. Check both Read permissions and the selected domain and account.
  • Domain not found: use the Zone ID, not the domain name.
  • Visitor reports are empty: enable Analytics & Logs → Web Analytics and check the tracking snippet is on your site.
Investigate with this connection

Reads rum and http. RUM is pinned to the saved account and hostname; beacon traffic is sampled and not verified human.

Run in your terminal
sprid marketing-review capabilities --app <slug> --source cloudflare --json

See connected queries.

Sources and verification

Prefer your terminal? sprid docs cloudflare reads this same guide.

Need a hand?
Colour theme
Back to Sprid ↗