Advertisement
jaspacio

GA4 Add Shipping Info

Dec 22nd, 2022 (edited)
628
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: "add_shipping_info",
  5.   ecommerce: {
  6.     currency: "USD",
  7.     value: 7.77,
  8.     coupon: "SUMMER_FUN",
  9.     shipping_tier: "Ground",
  10.     items: [
  11.     {
  12.       item_id: "SKU_12345",
  13.       item_name: "Stan and Friends Tee",
  14.       affiliation: "Google Merchandise Store",
  15.       coupon: "SUMMER_FUN",
  16.       currency: "USD",
  17.       discount: 2.22,
  18.       index: 0,
  19.       item_brand: "Google",
  20.       item_category: "Apparel",
  21.       item_category2: "Adult",
  22.       item_category3: "Shirts",
  23.       item_category4: "Crew",
  24.       item_category5: "Short sleeve",
  25.       item_list_id: "related_products",
  26.       item_list_name: "Related Products",
  27.       item_variant: "green",
  28.       location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
  29.       price: 9.99,
  30.       quantity: 1
  31.     }
  32.     ]
  33.   }
  34. });
  35. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement