Hi,
I am looking to add such code and track "Adding a Product to a Shopping Cart" in my GA:
// Measure adding a product to a shopping cart by using an 'add' actionFieldObject
// and a list of productFieldObjects.
dataLayer.push({
'event': 'addToCart',
'ecommerce': {
'currencyCode': 'EUR',
'add': { // 'add' actionFieldObject measures.
'products': [{ // adding a product to a shopping cart.
'name': 'Triblend Android T-Shirt',
'id': '12345',
'price': '15.25',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Gray',
'quantity': 1
}]
}
}
});
Now I am thinking where should I place this code. In which view?
Same question for "Removing a Product from a Shopping Cart"?
I do not use hikashop GA plugin cause after a lot of tries it doesn't work with me so I use google tag manager....
Thanks