Created
November 6, 2024 01:20
-
-
Save oliwoodsuk/462b5fe00180709357e43c648164a740 to your computer and use it in GitHub Desktop.
Tracking pre-order event in Shopify Analytics directly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.addEventListener(ppConvertingButtonClicked, (e) => { | |
window.ShopifyAnalytics.lib.track('AddToCart', { | |
product_id: e.detail.productId, | |
quantity: e.detail.quantity | |
}); | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment