Troubleshooting Guide & CSP

If beacons aren't showing up in your dashboard, or you're hitting setup warnings, work through this checklist in order.


Diagnostic checklist

1. Inspect page source

Open your website, right-click, and choose View Page Source. Search (Ctrl+F / Cmd+F) for tracker.js:

  • Confirm the <script> tag is present inside <head>.
  • Confirm the site-id query parameter is populated and matches your project.

2. Inspect network requests

  1. Open Developer Tools (F12 or right-click → Inspect).
  2. Switch to the Network tab and refresh the page.
  3. Filter by tracker.js and /api/track:
    • tracker.js must return 200 OK.
    • /api/track (POST) must return 200 OK or 204 No Content.

3. Review browser console messages

Console MessageProbable CauseResolution
Missing site-id parameterScript URL is missing ?site-id=...Copy the complete snippet from Project Settings → Tracking Snippet.
Invalid site-idProject was deleted or site-id is mismatchedVerify the project exists in your workspace and update the snippet ID.
Domain not authorized for trackingHostname doesn't match the configured project domainUpdate the project's URL in Project Settings → General to match your domain (e.g. example.com or staging.example.com).
Failed to fetch / Connection refusedAnalytics deployment is unreachableCheck your Vercel deployment status and verify NEXT_PUBLIC_SITE_URL.
Blocked by client / ERR_BLOCKED_BY_CLIENTAd-blocker or privacy extension intercepted the requestWhitelist your self-hosted analytics domain in your browser extensions.

Content Security Policy (CSP)

If your site enforces a CSP, allow script downloads and beacon connections to your analytics domain:

http
1Content-Security-Policy: 2 script-src 'self' https://analytics.yourdomain.com; 3 connect-src 'self' https://analytics.yourdomain.com;

Next.js example (next.config.js)

javascript
1// next.config.js 2module.exports = { 3 async headers() { 4 return [ 5 { 6 source: '/:path*', 7 headers: [ 8 { 9 key: 'Content-Security-Policy', 10 value: "script-src 'self' https://analytics.yourdomain.com; connect-src 'self' https://analytics.yourdomain.com;", 11 }, 12 ], 13 }, 14 ]; 15 }, 16};

Database connection issues

Symptom / ErrorProbable CauseResolution
Connection terminated unexpectedlyMax connections exceeded / missing poolerSwitch to a pooled connection string (Neon -pooler or Supabase port 6543).
relation "projects" does not existDatabase migrations haven't runRun npm run db:migrate against your DATABASE_URL.
SSL connection is requiredDatabase server requires SSLAppend ?sslmode=require to your DATABASE_URL.
ETIMEDOUT / ECONNREFUSEDDatabase host is firewalled or unreachableVerify database credentials and confirm outbound access on port 5432 / 6543.

Still stuck?


Next steps