WordPress / WooCommerce
Two ways to get the snippet into your site's <head> — pick whichever fits how you manage the site.
Option A — a header plugin (no code)
Install "Insert Headers and Footers" (or any equivalent plugin) and paste the AdsPing snippet into the header section. Works on any theme without code changes and survives theme updates.
header.html
<script src="https://api.adsping.io/pb.js" data-pixel-id="YOUR_PIXEL_ID"></script>Option B — edit theme functions.php
If you manage the theme yourself, add the script via a wp_head hook — ideally in a child theme so updates don't overwrite it:
php
add_action('wp_head', function () {
echo '<script src="https://api.adsping.io/pb.js" data-pixel-id="YOUR_PIXEL_ID"></script>';
});WooCommerce events
With the snippet installed, PageView, click ids, and form auto-capture work immediately. For WooCommerce conversion events (Purchase on the thank-you page, AddToCart), see the WooCommerce section of the integration guide — copy-paste hooks for both.
Verify
- Open your site, then DevTools → Network → filter
adsping—pb.jsand the PageView request both return 200. - The pixel detail page in AdsPing shows
Last event: a few seconds ago.
Once pb.js is firing, head to Connect Meta to start forwarding events.