Created
June 30, 2018 14:38
-
-
Save marcusRB/af4280d43ba372ee5ff2cd6035c7054c to your computer and use it in GitHub Desktop.
Measuring Views of Product Details EEC dataLayer
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> | |
// Measure a view of product details. This example assumes the detail view occurs on pageload, | |
// and also tracks a standard pageview of the details page. | |
dataLayer.push({ | |
'ecommerce': { | |
'detail': { | |
'actionField': {'list': 'Apparel Gallery'}, // 'detail' actions have an optional list property. | |
'products': [{ | |
'name': 'Triblend Android T-Shirt', // Name or ID is required. | |
'id': '12345', | |
'price': '15.25', | |
'brand': 'Google', | |
'category': 'Apparel', | |
'variant': 'Gray' | |
}] | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment