Created
June 30, 2018 11:14
-
-
Save marcusRB/775ce09c42ca08bc52c84d1e734f8b39 to your computer and use it in GitHub Desktop.
Measuring Product Impressions 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> | |
// Measures product impressions and also tracks a standard | |
// pageview for the tag configuration. | |
// Product impressions are sent by pushing an impressions object | |
// containing one or more impressionFieldObjects. | |
dataLayer.push({ | |
'ecommerce': { | |
'currencyCode': 'EUR', // Local currency is optional. | |
'impressions': [ | |
{ | |
'name': 'Triblend Android T-Shirt', // Name or ID is required. | |
'id': '12345', | |
'price': '15.25', | |
'brand': 'Google', | |
'category': 'Apparel', | |
'variant': 'Gray', | |
'list': 'Search Results', | |
'position': 1 | |
}, | |
{ | |
'name': 'Donut Friday Scented T-Shirt', | |
'id': '67890', | |
'price': '33.75', | |
'brand': 'Google', | |
'category': 'Apparel', | |
'variant': 'Black', | |
'list': 'Search Results', | |
'position': 2 | |
}] | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment