Table of contents

Add to cart

The Google Tag Manager (GTM) "Add to Cart" event is executed when a user clicks the "Add to Cart" button on an e-commerce website. This action triggers a predefined event within GTM, which can be used for tracking purposes in Google Analytics or other marketing and analytics tools.

window.dataLayer.push({ event: 'add_to_cart', ecommerce: { currency: "EUR", value: 87.99, items: [ { item_id: "746717-15478", item_name: "Gazelle Γυναικεία Sneakers", affiliation: 'The Athletes Foot GR', currency: 'EUR', discount: 22, index: 0, item_variant: "746717-15478.16132", price: 109.99, quantity: 1 } ] } });