HTML snippet
Works on any site where you can edit the HTML head: hand-written sites, static site generators, and builders without a guide of their own.
1 Add the script to every page
Paste this into the <head> of every page, or of the shared layout or template:
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script> async keeps the page fast: the script loads in parallel and never blocks rendering. Load it once per page.
A second copy, for example from Google Tag Manager, does nothing.
2 If your code calls Pixelary early
If your own scripts call pixelary(…) before the script has loaded, add the two-line stub above it. Calls
made earlier are queued and run in order once Pixelary starts.
<script>
window.pixelary = window.pixelary || function () {
(window.pixelary.q = window.pixelary.q || []).push(arguments);
};
</script>
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script> 3 Publish and verify
Publish the change and open your site. The Install page in the dashboard turns green when the first event arrives. To
watch it in the browser, add ?pixelary_debug=1 to the page address: every command and event is logged to
the console with the reason it was sent, held or dropped.
Domains
Pixelary accepts events only from the domains of your site in the dashboard. Add each domain the script runs on, including staging addresses you want to test from.
Content Security Policy
If your site sends a Content-Security-Policy header, allow Pixelary and the pixels you connect:
script-src https://cdn.pixelary.app https://connect.facebook.net https://analytics.tiktok.com https://bzrcdn.openai.com
connect-src https://api.pixelary.app https://www.facebook.com https://analytics.tiktok.com https://bzr.openai.com https://bzrcdn.openai.com
img-src https://www.facebook.com https://bzr.openai.com Something here doesn’t match what you see? Write to hello@pixelary.app.