emanuel1109

Ascend - Add To Cart

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