Advertisement
LouisDon

dataLayer_ga4_view_item_list

Jan 18th, 2022 (edited)
412
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
  2. dataLayer.push({
  3.   event: "view_item_list",
  4.   ecommerce: {
  5.       items: [
  6.     {
  7.         item_id: "SKU_12345",
  8.         item_name: "Stan and Friends Tee",
  9.         affiliation: "Google Merchandise Store",
  10.         coupon: "SUMMER_FUN",
  11.         currency: "USD",
  12.         discount: 2.22,
  13.         index: 0,
  14.         item_brand: "Google",
  15.         item_category: "Apparel",
  16.         item_category2: "Adult",
  17.         item_category3: "Shirts",
  18.         item_category4: "Crew",
  19.         item_category5: "Short sleeve",
  20.         item_list_id: "related_products",
  21.         item_list_name: "Related Products",
  22.         item_variant: "green",
  23.         location_id: "L_12345",
  24.         price: 9.99,
  25.         quantity: 1
  26.     },
  27.     {
  28.         item_id: "SKU_12346",
  29.         item_name: "Google Grey Women's Tee",
  30.         affiliation: "Google Merchandise Store",
  31.         coupon: "SUMMER_FUN",
  32.         currency: "USD",
  33.         discount: 3.33,
  34.         index: 1,
  35.         item_brand: "Google",
  36.         item_category: "Apparel",
  37.         item_category2: "Adult",
  38.         item_category3: "Shirts",
  39.         item_category4: "Crew",
  40.         item_category5: "Short sleeve",
  41.         item_list_id: "related_products",
  42.         item_list_name: "Related Products",
  43.         item_variant: "gray",
  44.         location_id: "L_12345",
  45.         price: 20.99,
  46.         promotion_id: "P_12345",
  47.         promotion_name: "Summer Sale",
  48.         quantity: 1
  49.     }]
  50.   }
  51. });
Advertisement
RAW Paste Data Copied
Advertisement