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:
-
Gift suppression via line item properties in the pixel — didn’t work because
product_added_to_cartnever fires at all with a multi-item/cart/add.jscall (confirmed Shopify bug: ref) -
document.dispatchEventcustom event from theme JS after cart add — pixel sandbox iframe can’t hear main window DOM events -
Currently testing
window.Shopify.analytics.publishfrom theme JS +analytics.subscribein the pixel to manually fire 1 clean ATC for the paid product only
Questions:
-
Is
window.Shopify.analytics.publishthe right approach here? -
Has anyone solved the 3x ATC problem in a similar welcome kit / bundle direct-to-checkout flow?
-
Any better alternatives we’re missing?
Thanks!