Meta Pixel
Send shopping events from your Puddle website and checkout to your Meta Pixel for ads measurement and optimisation.
The Meta Pixel plugin loads your pixel on your Puddle website and on Puddle's hosted checkout, and sends the shopper's journey from the first page view to the purchase. If your storefront is your own code (a custom storefront), it sends its own events; see Custom storefront events.
Set up
- Copy your Pixel ID from Meta Events Manager. It's the 15–16 digit dataset ID.
- In the admin, open Settings → Plugins and install Meta Pixel.
- Choose Configure, paste the Pixel ID, then Test and Enable.
Events sent
| Moment | Where | Meta event |
|---|---|---|
| Any page opens | Website and checkout | PageView |
| A product page opens | Website | ViewContent |
| Shopper searches | Website | Search |
| Item added to the cart | Website | AddToCart |
| Product added to the wishlist | Website | AddToWishlist |
| Checkout page opens | Checkout | InitiateCheckout |
| Shopper submits payment | Checkout | AddPaymentInfo |
| Payment is confirmed | Checkout | Purchase (once per checkout) |
Events with products include:
valueandcurrency(ZAR)content_type: "product"content_ids: the variant ID, or the product ID for products without variantscontents: the ID, quantity and unit price of each itemnum_items
The events don't include names, email addresses or other personal details.
Each event also has an eventID. Checkout events use <event>:<checkoutSessionId>, for example checkout_completed:9f1c…; website events use <event>:<random id>. Meta uses it to deduplicate events sent from more than one place, such as the browser and the Conversions API.
Draft previews and the website editor never send events.
Custom storefront events
Add the pixel to your storefront with the same Pixel ID, and send the events that happen there: PageView, ViewContent and AddToCart. Use the same IDs as checkout so Meta can match products across the funnel: the variant ID when there is one, otherwise the product ID.
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>// When a shopper adds an item to the cart
fbq("track", "AddToCart", {
content_type: "product",
content_ids: [variant?.id ?? product.id],
value: price / 100,
currency: "ZAR",
});
