Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- event: 'add_to_cart', // name of the event. In this case, it always must be add_to_cart
- ecommerce: {
- items: [{ // an array with a product (or multiple products) that was added to a cart
- item_name: '9781284227215, Navigate Premier Access for Emergency Care and Transportation of the Sick and Injur', // insert the book name
- item_id: '22721-5', // insert book ID or SKU (also called Book Code)
- price: '11.99', // insert an actual book price. Number or a string. Don't include currency code
- item_category: 'EMS', // insert an actual product top-level category (also called Product Class)
- item_category2: 'AAOS: CAROLINE EMERG CARE IN STREETS 8E', // insert the product group
- item_category3: 'X AAOS', // insert author here
- quantity: '1' // product quantity.
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment