Boffy Pixel — Install Guide
Track purchases and attribution directly from your website. One snippet. No GA4 required.
1. Get your pixel key
Log into your Boffy portal → Tracking Panel → Boffy Pixel. Click Create keyand copy it (you'll only see it once).
Keys look like boffy_pk_…
2. Add the loader snippet
Paste this in the <head> of every page on your site — ideally sitewide so we can track sessions from first visit.
<script>
(function(w,d,s){w.boffy=w.boffy||function(){(w.boffy.q=w.boffy.q||[]).push(arguments)};
var e=d.createElement(s);e.async=1;e.src="https://boffy.io/boffy.js";
var f=d.getElementsByTagName(s)[0];f.parentNode.insertBefore(e,f);})(window,document,"script");
boffy("init", "boffy_pk_YOUR_KEY_HERE");
</script>3. Fire a purchase event
On your checkout success / thank-you page, call boffy("track", "purchase", …):
<script>
boffy("track", "purchase", {
orderId: "ORDER_12345", // required — used for deduplication
value: 49.90, // order total
currency: "EUR"
});
</script>orderId is important — if the page reloads, the event is deduplicated automatically.
4. Other events (optional)
boffy("track", "add_to_cart", { value: 19.90 });
boffy("track", "begin_checkout", { value: 49.90 });
boffy("track", "view_product", { sku: "SKU-123" });Platform guides
Shopify
- Settings → Checkout → Order status page → Additional scripts.
- Paste the loader snippet, then the purchase event with Shopify liquid variables:
<script>
boffy("track", "purchase", {
orderId: "{{ order.order_number }}",
value: {{ total_price | money_without_currency }},
currency: "{{ shop.currency }}"
});
</script>WooCommerce
Use the Snippets or Code Insertion plugin. Hook into woocommerce_thankyou and echo the snippet with order totals from $order->get_total().
Custom checkout
Add the loader script sitewide, then call boffy("track", "purchase", …) after a successful payment response. Server-side ingestion is also supported — POST to https://boffy.io/api/track/event with Authorization: Bearer boffy_pk_….
Privacy & GDPR
- IP addresses are hashed with a salt — never stored raw.
- Session IDs live in
sessionStorage— they expire when the tab closes. - No cookies. No cross-site tracking.
- You control the key — revoke any time from your portal.
Troubleshooting
Open your browser console and check the Network tab for /api/track/event — you should see {"ok":true}. If you see 401, your key is wrong or revoked.
Events appear in your portal within 60 seconds. Attribution rollups run daily.