Created
June 13, 2016 18:21
-
-
Save level09/649d77488ddfafd443156344021bf289 to your computer and use it in GitHub Desktop.
Ecommerce Tracking Code
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> | |
ga('require', 'ecommerce'); | |
ga('ecommerce:addTransaction', { | |
'id': '[Transaction ID]', // Transaction ID. Required. | |
'affiliation': 'DUKES Hotel', // Affiliation or store name. | |
'revenue': '[11.99]', // Grand Total. | |
'shipping': '0', // Shipping. | |
'tax': '[1.29]' // Tax. | |
}); | |
ga('ecommerce:addItem', { | |
'id': '[Transaction ID]', // Transaction ID. Required. | |
'name': '[+Classic Room]', // Product name. Required. | |
'sku': '[IC1KDR]', // SKU/code. | |
'category': '', // Category or variation. | |
'price': '[11.99]', // Unit price. | |
'quantity': '1' // Quantity. | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment