Advertisement
jaspacio

GA4 Begin Checkout

Jul 20th, 2022 (edited)
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
  3. dataLayer.push({
  4.   event: "begin_checkout",
  5.   ecommerce: {
  6.     items: [
  7.     {
  8.       item_id: "SKU_12345",
  9.       item_name: "Stan and Friends Tee",
  10.       affiliation: "Google Merchandise Store",
  11.       coupon: "SUMMER_FUN",
  12.       currency: "USD",
  13.       discount: 2.22,
  14.       index: 0,
  15.       item_brand: "Google",
  16.       item_category: "Apparel",
  17.       item_category2: "Adult",
  18.       item_category3: "Shirts",
  19.       item_category4: "Crew",
  20.       item_category5: "Short sleeve",
  21.       item_list_id: "related_products",
  22.       item_list_name: "Related Products",
  23.       item_variant: "green",
  24.       location_id: "L_12345",
  25.       price: 9.99,
  26.       quantity: 1
  27.     }
  28.     ]
  29.   }
  30. });
  31. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement