Skip to content

Instantly share code, notes, and snippets.

@marcusRB
Created June 30, 2018 14:44
Show Gist options
  • Save marcusRB/b3360941e95e2a71bf8bd0985fb3438d to your computer and use it in GitHub Desktop.
Save marcusRB/b3360941e95e2a71bf8bd0985fb3438d to your computer and use it in GitHub Desktop.
Remove a Product from to Shopping Cart EEC dataLayer
// Measure the removal of a product from a shopping cart.
dataLayer.push({
'event': 'removeFromCart',
'ecommerce': {
'remove': { // 'remove' actionFieldObject measures.
'products': [{ // removing a product to a shopping cart.
'name': 'Triblend Android T-Shirt',
'id': '12345',
'price': '15.25',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Gray',
'quantity': 1
}]
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment