Advertisement
Jawad_Khan

GA4 - Checkout - 180

Jul 9th, 2024 (edited)
78
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: 'begin_checkout',              // name of the event. In this case, it always must be begin_checkout
  4.   ecommerce: {                         
  5.     items: [{                           // an array with all products (that were in a cart when the checkout began)
  6.       item_name: 'Vuse ePod 2 Device - Closed Pod System',          // insert an actual product name
  7.       item_id: '6589',              // insert an actual product ID
  8.       price: 14.99,                 // insert an actual product price. Number or a string. Don't include currency code
  9.       item_brand: 'Vuse/Vype',          // insert an actual product price
  10.       item_category: 'Vape Kits+Vapes & E-cigs',            // insert an actual product top-level category/
  11.       item_variant: 'Blue',             // insert an actual product variant
  12.       item_list_name: 'Filter', // insert the name of the list where the product is currently displayed
  13.       item_list_id: 'instock=true&price=10-50&manufacturer=Vuse/Vype&batterycapacity=350mAh',   // insert the list id where the product is currently displayed
  14.       index: 0,                         // insert product's position in that list
  15.       quantity: '1'                     // product quantity. In case of view_item_list, it will usually be equal to 1
  16.  
  17.     }]
  18.   }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement