Last Updated 6 years ago

Data sent via the dataLayer

Each data set for a single product contains:
- id - product id
- variant - combination attributes
- name - product name
- price - product price
- brand - product manufacturer
- category - name of the product's default category

Data is sent according to the documentation:
https://developers.google.com/tag-manager/enhanced-ecommerce

Displaying products
https://developers.google.com/tag-manager/enhanced-ecommerce#product-impressions
{
'ecommerce': {
'currencyCode': 'EUR', // currency
'impressions': [
{
... // standard product data set
'list': 'Search Results', // product list name
'position': 1 // position on the product list
},
... // next products on the list
]
}
}


Clicking on products
https://developers.google.com/tag-manager/enhanced-ecommerce#product-clicks
{
'event': 'productClick',
'ecommerce': {
'click': {
'actionField': {
'list': 'Product Page' // product list name
},
'products': [
{
... // standard product data set
'position': 1 // position on the product list
}
]
}
}
}


Viewing product details
https://developers.google.com/tag-manager/enhanced-ecommerce#details
{
'ecommerce': {
'detail': {
'actionField': {
'list': 'Product Page' // product list name
},
'products': [
{
... // standard product data set
}
]
}
}
}


Adding products to cart
https://developers.google.com/tag-manager/enhanced-ecommerce#add
{
'event': 'addToCart',
'ecommerce': {
'currencyCode': 'EUR', // currency
'add': {
'products': [
{
... // standard product data set
'quantity': 1 // product quantity
}
]
}
}
}


Removing products from cart
https://developers.google.com/tag-manager/enhanced-ecommerce#add
{
'event': 'removeFromCart',
'ecommerce': {
'add': {
'products': [
{
... // standard product data set
'quantity': 1 // product quantity
}
]
}
}
}


Checkout step
https://developers.google.com/tag-manager/enhanced-ecommerce#checkout_option
{
'event': 'checkout',
'ecommerce': {
'checkout': {
'actionField': {
'step': 1, // checkout step number
}
}
}
}


Choosing an option (e.g. shipping method) during checkout
https://developers.google.com/tag-manager/enhanced-ecommerce#checkout_option
{
'event': 'checkoutOption',
'ecommerce': {
'checkoutOption': {
'actionField': {
'step': 1, // checkout step number
'option': 'PayPal' // chosen option
}
}
}
}


Placing an order
https://developers.google.com/tag-manager/enhanced-ecommerce#purchases
{
'event': 'purchase',
'ecommerce': {
'purchase': {
'actionField': {
'id': 'T12345', // order id
'revenue': '35.43', // order value
'tax':'4.90', // tax value
'shipping': '5.99', // shipping cost
},
'products': [
{
... // standard product data set
'quantity': 1 // product quantity
}
]
}
}
}

Please Wait!

Please wait... it will take a second!

Kliknij by skopiować