Created
February 23, 2020 15:59
-
-
Save dylanjhunt/66e1c6183d4f78a503c4d2f06ee94782 to your computer and use it in GitHub Desktop.
Shopify DataLayer variables
This file contains 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.dataLayer = window.dataLayer || []; | |
window.dataLayer.push({ | |
'ecomm__orderValue': '{{ checkout.total_price | money_without_currency }}', | |
'ecomm__orderNumber': '{{ checkout.order_number }}', | |
'ecomm__itemCount': '{{ line_items.size }}', | |
'ecomm__customerEmail': '{{ checkout.customer.email }}' | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment