dusanmiha

GA4 - add_to_wishlist

Oct 6th, 2021 (edited)
603
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: 'add_to_wishlist',
  4.   ecommerce: {
  5.     items: [{
  6.       item_name: 'Product 1',                    //Required. Product Name - Type: string
  7.       item_id: 'mp1122',                        //Required. Product ID/SKU - Type: string
  8.       price: '31.10',                           //Product price - Type: numeric
  9.       item_brand: 'product brand',              //Product Brand- Type: string  
  10.       item_category: 'Apparel',                 //Product Category - Type: string
  11.       item_category2: 'Coats',                  //Product Sub-Category 1 - Type: string
  12.       item_category3: 'Wool',                   //Product Sub-Category 2 - Type: string
  13.       item_category4: 'Unisex',                 //Product Sub-Category 3 - Type: string
  14.       item_category5: 'cat5',                 //Product Sub-Category 4 - Type: string
  15.       item_variant: 'Navy blue',                //Variant of other product like size, color et c - Type: string
  16.       quantity: '1'                             //number of items - Type: integer
  17.     }]
  18.   }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment