Single /cart/add.js request firing AddToCart 3 times on Meta pixel — welcome kit flow

Hey everyone,

We have a store with a custom purchase flow — no PDP, everything on the homepage. When the customer clicks the CTA, we call /cart/add.js with multiple items in a single request (1 main product + 2 free gift items with custom properties), then redirect straight to /checkout.

The problem: Meta is receiving 3x AddToCart events — one per item in the batch, including the free gifts. We only want 1 ATC firing for the main paid product.

What we tried:

  1. Gift suppression via line item properties in the pixel — didn’t work because product_added_to_cart never fires at all with a multi-item /cart/add.js call (confirmed Shopify bug: ref)

  2. document.dispatchEvent custom event from theme JS after cart add — pixel sandbox iframe can’t hear main window DOM events

  3. Currently testing window.Shopify.analytics.publish from theme JS + analytics.subscribe in the pixel to manually fire 1 clean ATC for the paid product only

Questions:

  1. Is window.Shopify.analytics.publish the right approach here?

  2. Has anyone solved the 3x ATC problem in a similar welcome kit / bundle direct-to-checkout flow?

  3. Any better alternatives we’re missing?

Thanks!