Advertisement
JITreviso

ga4_eec | select_item

Aug 17th, 2022
689
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: 'select_item',             // name of the event. In this case, it always must be select_item
  4.   ecommerce: {                          
  5.     items: [{                           // an array with a product that was clicked
  6.       item_name: 'MARLBORO RED SUMMIT',           // insert an actual product name
  7.       item_id: 'MLB1985',              // 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_variant: 'Red Summit',             // insert an actual product variant
  11.       index: 1,                         // insert product's position in that list
  12.       quantity: '1'                     // product quantity. In this case, it will usually be equal to 1
  13.     }]
  14.   }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement