window.ms.bind('ms.entity.carts.add_product_success', function (event) {
var product = event.data.data.product;
dataLayer.push({
'event': 'addToCart',
'ecommerce': {
'currencyCode': ms.user.currency.name,
'add': { // 'add' actionFieldObject measures.
'products': [
{ // adding a product to a shopping cart.
'name': product.name,
'id': product.sku,
'price': product.price,
'brand': product.brand,
'category': product.category,
'quantity': 1
}
]
}
}
});
});
We use essential cookies to make the site work, and analytics/marketing cookies only with your permission. Continuing to browse this website means you agree to the use of cookies in accordance with the privacy policy. Privacy policy