Advertisement
JITreviso

ga4_eec | view_item

Aug 17th, 2022
700
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: 'view_item',           // name of the event. In this case, it always must be view_item
  4.   ecommerce: {                          
  5.     items: [{                           // an array with a product
  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 Blue',             // insert an actual product variant
  11.       quantity: '1'                     // product quantity. In this case, it will usually be equal to 1
  12.     }]
  13.   }
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement