PuddlePuddle Docs
Plugins

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

  1. Copy your Pixel ID from Meta Events Manager. It's the 15–16 digit dataset ID.
  2. In the admin, open Settings → Plugins and install Meta Pixel.
  3. Choose Configure, paste the Pixel ID, then Test and Enable.

Events sent

MomentWhereMeta event
Any page opensWebsite and checkoutPageView
A product page opensWebsiteViewContent
Shopper searchesWebsiteSearch
Item added to the cartWebsiteAddToCart
Product added to the wishlistWebsiteAddToWishlist
Checkout page opensCheckoutInitiateCheckout
Shopper submits paymentCheckoutAddPaymentInfo
Payment is confirmedCheckoutPurchase (once per checkout)

Events with products include:

  • value and currency (ZAR)
  • content_type: "product"
  • content_ids: the variant ID, or the product ID for products without variants
  • contents: the ID, quantity and unit price of each item
  • num_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",
});

On this page