Advertisement
emanuel1109

Liz - SS - begin_checkout

Aug 1st, 2022
74
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: '20mm Canvas Smart Watch Strap',           // insert an actual product name
  7.       item_id: 'product1',              // insert an actual product ID (like it appears in WooCommerce)
  8.       price: 11.99,                 // insert an actual product price. Number or a string. Don't include currency code
  9.       item_brand: 'Garmin',         // insert an actual product brand
  10.       item_category: 'Fitbit',          // insert an actual product top-level category
  11.       item_category2: 'Fitbit Charge 2',        // if it is possible to drill down the categories (e.g. Apparel, then T-shirt, then Men), use item_category2, item_category3, etc. Can use from item_category up to item_category5
  12.       item_variant: 'Green,18mm,Short',             // insert an actual product variant
  13.       quantity: '1'                 // product quantity
  14.     },{
  15.       item_name: 'Apple Watch',             // insert an actual product name
  16.       item_id: 'product2',              // insert an actual product ID (like it appears in WooCommerce)
  17.       price: 11.99,                 // insert an actual product price. Number or a string. Don't include currency code
  18.       item_brand: 'Apple',          // insert an actual product brand
  19.       item_category: 'Apple',           // insert an actual product top-level category
  20.       item_category2: 'Apple Watch',        // if it is possible to drill down the categories (e.g. Apparel, then T-shirt, then Men), use item_category2, item_category3, etc. Can use from item_category up to item_category5
  21.       item_variant: 'Green,18mm,Short',             // insert an actual product variant
  22.       quantity: '1'                 // product quantity
  23.     }]
  24.   }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement