Skip to content

Instantly share code, notes, and snippets.

@marcusRB
Created June 30, 2018 09:30
Show Gist options
  • Save marcusRB/c4b1166a45663537f56a228a15cb9daf to your computer and use it in GitHub Desktop.
Save marcusRB/c4b1166a45663537f56a228a15cb9daf to your computer and use it in GitHub Desktop.
GA Classic Ecommerce for Google Tag Manager dataLayer
<script>
window.dataLayer = window.dataLayer || []
dataLayer.push({
'transactionId': '1234',
'transactionAffiliation': 'Moda Filomena',
'transactionTotal': 38.26,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'DD44',
'name': 'Camiseta',
'category': 'Indumentaria',
'price': 11.99,
'quantity': 1
},{
'sku': 'AA1243544',
'name': 'Calcetines',
'category': 'Indumentaria',
'price': 9.99,
'quantity': 2
}]
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment