Appearance
Installing the snippet
The snippet is a single script tag. Your dashboard's Setup instructions dialog shows it pre-filled with your tracking subdomain and client ID — and so does this page, once you've set your values from the top navigation:
html
<script async src="https://track.yourdomain.com/prism.js?id=cl_yourclient" data-cfasync="false"></script>Place it before the closing </head> tag on every page you want tracked. It loads asynchronously (~3 KB) and does not block rendering.
Keep data-cfasync="false"
If the site is behind Cloudflare with Rocket Loader enabled, this attribute stops Rocket Loader from deferring the script and breaking early click-ID capture. It's harmless everywhere else — leave it in.
Running an e-commerce store?
Shopify doesn't use this snippet at all — its checkout runs in a sandbox this script can't execute in. Follow the Shopify install guide instead, which uses a custom pixel built for that sandbox.
WooCommerce uses this same snippet — install it as above — plus two order webhooks for reliable purchase totals. See the WooCommerce install guide.
Every other platform uses this same snippet, and gets the full e-commerce event journey — cart, checkout steps, purchases — for free if the site already has GA4/Google Tag Manager e-commerce tracking. See Detecting e-commerce with dataLayer for how that works.
Remove existing Meta pixel installs
If the site already runs a Meta pixel — hardcoded base code, the Meta WordPress plugin, or a Custom HTML tag in Tag Manager — remove it when Prism's Meta CAPI connection goes live. A legacy pixel running alongside Prism double-counts events and can carry hidden browser-side rules (Meta's Event Setup Tool) that fire events no code on the site explains. Removing it costs nothing: Prism generates the _fbp browser ID itself.
Full checklist of where pixels hide and how to verify removal: Meta CAPI → Remove existing pixel installs first.
What it does on load
- Captures ad click IDs from the URL (
fbclid,gclid,ttclid, and others) into 90-day first-party cookies. - Fetches a server-issued identity (
adsidian_id, an HTTP-only cookie that lasts 1 year). - Fires an automatic
PageViewevent. - Captures UTM parameters on every event.
Platform guides
WordPress
- With a theme that supports header scripts (Astra, GeneratePress, …): Appearance → Customize → Header scripts (naming varies), paste the tag.
- Any theme: install a header/footer script plugin (e.g. WPCode), add the tag to the header section, site-wide.
- WordPress.com (Business/Commerce): Tools → Marketing → Traffic or a header-script plugin as above.
Shopify
Don't use this snippet — see the dedicated Shopify install guide, which uses a custom pixel built for Shopify's checkout sandbox.
Webflow
Site settings → Custom code → Head code, paste, publish.
Google Tag Manager
Prefer a direct install when possible (GTM adds a loading layer that ad blockers target). If GTM is the only option: create a Custom HTML tag with the snippet, trigger on All Pages — Page View, and enable Support document.write off (not needed).
Plain HTML / other CMS
Paste into the shared header template so it renders on every page.
Single-page applications
The snippet fires PageView once per full page load. For client-side route changes in a SPA, fire a manual page view on navigation:
js
window.prism('track', 'PageView');Next
- Verify your install
- Track custom events
- E-commerce events, if you're tracking a store