Advertisement
JITreviso

ga4_eec | remove_from_cart

Aug 17th, 2022
532
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: 'remove_from_cart',              // name of the event. In this case, it always must be view_item_list
  4.   ecommerce: {                          
  5.     items: [{                           // an array where all currently viewed products must be included
  6.       item_name: 'MARLBORO RED SUMMIT',   // insert an actual product name
  7.       item_id: 'MLB0185',              // insert an actual product ID
  8.       price: '325.00',                   // insert an actual product price. Number or a string. Don't include currency code
  9.       item_brand: 'Marlboro',            // insert an actual product price
  10.       item_category: 'Marlboro',         // insert an actual product top-level category
  11.       item_variant: 'Red Summit',             // insert an actual product variant
  12.       index: 1,                         // insert product's position in that list
  13.       quantity: '1'                     // product quantity. In case of view_item_list, it will usually be equal to 1
  14.     },{
  15.       item_name: 'JUMBO PACK PHILIP MORRIS MIX&MATCH',
  16.       item_id: 'PMIJP1086',
  17.       price: '540.00',
  18.       item_brand: 'Jumbo Pack',
  19.       item_category: 'Philip Morris',
  20.       item_variant: 'Jumbo Pack',
  21.       index: 2,
  22.       quantity: '1'
  23.     }]
  24.   }
  25. });
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement