Skip to content

Instantly share code, notes, and snippets.

@oliwoodsuk
oliwoodsuk / track-pre-order-add-to-cart.liquid
Created November 6, 2024 01:20
Tracking pre-order event in Shopify Analytics directly
<script>
window.addEventListener(ppConvertingButtonClicked, (e) => {
window.ShopifyAnalytics.lib.track('AddToCart', {
product_id: e.detail.productId,
quantity: e.detail.quantity
});
})
</script>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.