Web — any site
One script tag before </head>. Works with plain HTML, static-site generators, and every CMS with an editable template.
1. Get your snippet
Every pixel has a unique ID — find your ready-to-paste snippet at the top of the pixel detail page in your dashboard. It looks like this:
index.html
<script src="https://api.adsping.io/pb.js" data-pixel-id="YOUR_PIXEL_ID"></script>The script is ~30KB, async by default, and never blocks page render.
2. Paste it
Put the snippet just before the closing </head> tag, on every page you want to track. Most sites have a single layout file or template that covers the whole site — paste it once there.
3. Verify
- Open your site, then DevTools → Network → filter
adsping. - You should see
pb.jsload (200) and a request to/api/v1/t/PIXEL_IDwith the PageView payload (200). - In your AdsPing dashboard the pixel detail page shows
Last event: a few seconds ago.
What tracks automatically
- PageView on every page load — no code needed.
- Click ids —
fbclid,gclid,ttclidare captured from the URL and attached to every later event. - Form auto-capture — submits are detected and email/phone are hashed (SHA-256) client-side for advanced matching.
- Browser pixels — Meta / TikTok browser scripts are auto-injected (when those destinations are connected) with a shared event id for deduplication.
Next steps
- Connect a destination — until you do, events are captured and counted but not sent anywhere.
- Add conversion events — Lead, Purchase and more, each a one-call setup.
Building with React or Next.js? Use the React / Next.js guide instead — same snippet, plus the SPA route-change note.