Installation & setup

Content-Security-Policy setup

Running a strict CSP is a great habit, and it takes exactly two directives to allow BobRay through it.

5 min read Updated June 2026 Installation & setup
<script defer src="cdn.bobray.com/b.js">

The two directives

script-src  ... https://cdn.bobray.com;
connect-src ... https://api.bobray.com;

script-src lets the browser load the 1KB tracker; connect-src lets it send the pageview beacon. Nothing else is contacted, no fonts, no frames, no third parties.

Diagnosing a CSP block

A blocked tracker shows in DevTools as a console error naming the violated directive, and your dashboard shows nothing. Fix the header (or <meta http-equiv="Content-Security-Policy"> tag), redeploy, and re-run verification.

With nonces or hashes

If your policy uses nonces, external scripts allowed by host do not need one, keep the host allowlist entry. If you inline the loader instead (not recommended), you would need to hash it and update the hash on every tracker release, which is why we suggest the hosted file.

Common pitfalls

The mistakes we see most often on this topic, so you can skip them entirely.

Quick reference

script-srchttps://cdn.bobray.com
connect-srchttps://api.bobray.com
Anything else?No fonts, frames, or 3rd parties
Symptom of blockConsole violation + no data
Did this solve it? If not, write to support with your site ID, a real person replies within one business day.