filipr27

GA4 - view_item_list - ofmpec

Apr 28th, 2022 (edited)
154
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',
  4.   ecommerce: {
  5.     items: [{
  6.       item_name: 'RockSEAL II Packer 5.75 x 3.50',              //Product Name - Type: string
  7.       item_id: 'RockSEAL-II-Packer-5.75-x-3.50',                       //Product ID/SKU - Type: string
  8.       price: 600.00,                              //Product price - Type: number
  9.       currency: 'USD',                             //Currency of the price that is collected - Type: string
  10.       discount: 0.00,                              //Any discount associated with this product - Type: number
  11.       item_brand: 'packers-plus',                        //Product Brand - Type: string  
  12.       affiliation: 'pp',                             //Vendor - Type: string
  13.       item_category: 'Completions',                    //Product Category - Type: string
  14.       item_category2: 'Production Packers',            //Product Sub-Category 1 - Type: string
  15.       item_category3: 'RockSEAL II Packer 5.75 x 3.50',            //Product Sub-Category 2 - Type: string
  16.       item_category4: 'Base product',            //Product Sub-Category 3 - Type: string
  17.       item_category5: 'item_category5',            //Product Sub-Category 4 - Type: string
  18.       item_variant: '120575-000002',                //Variant of the product - variant SKU/ID - Type: string
  19.       item_list_name: 'New and Popular',            //Product list name - Type: string
  20.       item_list_id: 'item_list_id',                //Product list ID - Type: string
  21.       index: 1,                                    //The index/position of the item in the list - Type: number
  22.       quantity: 1                                  //Product quantity - Type: number
  23.     },{
  24.       item_name: 'REDA ESP - Gas Handler',             //Product Name - Type: string
  25.       item_id: 'Reda-Esp-Gas-Handler',                 //Product ID/SKU - Type: string
  26.       price: 4125.00,                                 //Product price - Type: number
  27.       currency: 'USD',                                 //Currency of the price that is collected - Type: string
  28.       discount: 0.00,                                  //Any discount associated with this product - Type: number
  29.       affiliation: 'sals',                             //Vendor - Type: string
  30.       item_brand: 'schlumberger',                      //Product Brand - Type: string  
  31.       item_category: 'Production',                     //Product Category - Type: string
  32.       item_category2: 'Electrical Submersible Pumps',  //Product Sub-Category 1 - Type: string
  33.       item_category3: 'REDA ESP - Gas Handler',                //Product Sub-Category 2 - Type: string
  34.       item_category4: 'Base product',                //Product Sub-Category 3 - Type: string
  35.       item_category5: 'item_category5',                //Product Sub-Category 4 - Type: string
  36.       item_variant: 'Reda-Esp-Gas-Handler',                       //Variant of the product - variant SKU/ID - Type: string
  37.       item_list_name: 'New and Popular',            //Product list name - Type: string
  38.       item_list_id: 'item_list_id',                //Product list ID - Type: string
  39.       index: 2,                                    //The index/position of the item in the list - Type: number
  40.       quantity: 1                                      //Product quantity - Type: number
  41.     }]
  42.   }
  43. });
Add Comment
Please, Sign In to add comment