Advertisement
CharlotteVDB

GA4 - EEC - View item list - FDMKR

Nov 22nd, 2022
523
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: 'view_item_list',             // name of the event. In this case, it always must be view_item_list
  4.    ecommerce: {
  5.     items: [{                          
  6.       item_name: 'Alpecin-Fenix Sweatpants 2022',           // insert a product name
  7.       item_id: 'CIT30283',                      // insert an actual product ID
  8.       price: '49.90',                   // insert an actual product price. Number or a string. Don't include currency code
  9.       item_brand: 'FDMKR',         
  10.       item_category: 'Team Alpecin - Fenix',            // category of a product
  11.       item_category2: 'Sweatpants',         // subcategory of a product (type of clothing)
  12.       item_variant: 'L',            // variant of a product, if there are no variants, exclude this key from the dataLayer.push
  13.       item_list_name: 'Shop overview'
  14.       index: 1
  15.       quantity: '1'                     // always '1'
  16. },{
  17.       item_name: 'Twisted hoodie',          // insert a product name
  18.       item_id: 'CIT30284',                      // insert an actual product ID
  19.       price: '49.90',                   // insert an actual product price. Number or a string. Don't include currency code
  20.       item_brand: 'FDMKR',         
  21.       item_category: 'Lifestyle',           // category of a product
  22.       item_category2: 'Hoodie',         // subcategory of a product (type of clothing)
  23.       item_variant: 'S',        // variant of a product, if there are no variants, exclude this key from the dataLayer.push
  24.       item_list_name: 'Related products' // Shop overview vs. related products
  25.       index: 1
  26.       quantity: '1'                     // always '1'
  27.     }]
  28.   }
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement