Content-Security-Policy
The directives each install route needs on a site with a Content-Security-Policy.
On this page
If your site sends a Content-Security-Policy, Parlox needs one host in it: https://gateway.parlox.io. Where it goes depends on the install route.
| Install | script-src | connect-src |
|---|---|---|
| The pinned tag | https://gateway.parlox.io | https://gateway.parlox.io |
@parlox/browser from npm | Nothing to add: the tracker and its recorder chunk are part of your own build | https://gateway.parlox.io |
| The Shopify checkout pixel | Nothing: it runs in Shopify's sandbox, not under your policy | Nothing |
Nothing else is needed: no 'unsafe-inline', no 'unsafe-eval', no blob:, no workers, no styles, no images, no frames.
The tag
The tag loads two files from https://gateway.parlox.io/sdk/ (the tracker, and for browsers judged automated, the recorder) and sends beacons and recording chunks to the same host:
script-src 'self' https://gateway.parlox.io;
connect-src 'self' https://gateway.parlox.io;With a nonce-based policy that uses 'strict-dynamic', give the tag your nonce. The recorder it adds is then trusted through it, and connect-src still needs the gateway:
<script nonce="…" async src="https://gateway.parlox.io/sdk/1.0.3/parlox.js" integrity="sha384-naJsIFbLpeBsYg6qCN51Tt54BEFhO4MDhTMmrGP4Ja/nXjrfUziCot/3mHbhqCb+" crossorigin="anonymous" data-key="pk_…"></script>The pre-load stub is an inline script: give it your policy's nonce or hash, or move it into a file of your own.
The npm package
The tracker is bundled into your code, and the recorder is a chunk your bundler emits beside it, so both load under the script-src your app already has. Only the beacons and recording chunks leave your origin:
connect-src 'self' https://gateway.parlox.io;How this was tested
On 2026-10-16, release 1.0.3 was loaded in Chromium, Firefox and WebKit (through Playwright) on pages served with a strict policy built on default-src 'none' (img-src, font-src and style-src limited to the page's own stylesheets, web font and image, plus one cross-origin stylesheet; object-src 'none', base-uri 'none'):
- The tag with the gateway in
script-srcandconnect-src, the stub carrying the page's nonce: no violation in any engine; beacons and recording chunks were sent, and the recorder loaded (a browser driven by Playwright is automated, so the recorder ran too). - The tag under
'nonce-…' 'strict-dynamic', the tag carrying the nonce: the same result. - An npm build (
@parlox/browser1.0.3 bundled with esbuild) underscript-src 'self'with the gateway inconnect-srconly: the same result, its recorder chunk loaded from the page's own origin. - Controls: the same pages with the gateway left out of
script-src, or ofconnect-src, were blocked in every engine, and nothing was sent.
The gateway was stood in for during the test, at its real address, so the browsers enforced the policy against https://gateway.parlox.io itself.
Not part of the test: the Google Tag Manager template. It loads the tag from the same host, so it needs the gateway in script-src and connect-src too, besides whatever your Tag Manager setup already requires.