Symptom: Only initial pageload counted
Fix: Add spa: true:
<script data-cf-beacon='{"token": "TOKEN", "spa": true}' ...></script>
Symptom: Console error "Refused to load script"
Fix: Allow both domains:
script-src 'self' https://static.cloudflareinsights.com https://cloudflareinsights.com;
Symptom: #/path URLs not tracked
Fix: Migrate to History API (BrowserRouter, not HashRouter). No workaround for hash routing.
Causes & Fixes:
Cause: Cache-Control: no-transform header
Fix: Remove no-transform or install beacon manually
Cause: Multiple beacon scripts
Fix: Keep only one beacon per page
| Issue | Fix |
|---|---|
| 10-site limit reached | Delete old sites or proxy through CF (unlimited) |
| Token not recognized | Use exact alphanumeric token from dashboard |
<script suppressHydrationWarning ... />
Use gatsby-browser.js to load client-side only.
| Resource | Limit |
|---|---|
| Non-proxied sites | 10 |
| Proxied sites | Unlimited |
| Data retention | 6 months |
| Ingestion delay | 5-10 min |
| API access | None (dashboard only) |
Use alternatives if you need:
Web Analytics excels at: Core Web Vitals, basic traffic, privacy compliance, free unlimited pageviews.