Advertisement
dusanmiha

GA4 - add_payment_info

Oct 6th, 2021 (edited)
590
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_payment_info',
  4.   ecommerce: {
  5.     payment_type: 'Cash on Delivery',                         //required. Choosen payment option - Type: String
  6.     items: [{
  7.       item_name: 'Product 1',                    //Product Name - Type: string
  8.       item_id: 'mp1122',                        //Product ID/SKU - Type: string
  9.       price: '31.10',                           //Product price - Type: numeric
  10.       item_brand: 'product brand',              //Product Brand- Type: string  
  11.       item_category: 'Apparel',                 //Product Category - Type: string
  12.       item_category2: 'Coats',                  //Product Sub-Category 1 - Type: string
  13.       item_category3: 'Wool',                   //Product Sub-Category 2 - Type: string
  14.       item_category4: 'Unisex',                 //Product Sub-Category 3 - Type: string
  15.       item_category5: 'cat5',                   //Product Sub-Category 4 - Type: string
  16.       item_variant: 'Navy blue',                //Variant of other product like size, color et c - Type: string
  17.       quantity: '3'                             //Product quantity - Type: Integer
  18.     },{
  19.       item_name: 'Product 2',
  20.       item_id: 'psr1332',
  21.       price: '5.99',
  22.       item_brand: 'product brand',
  23.       item_category: 'Apparel',
  24.       item_category2: 'Utility',
  25.       item_category3: 'Care product',
  26.       item_category4: 'Unisex',                
  27.       item_category5: 'cat5',                  
  28.       quantity: '1'
  29.     }]
  30.   }
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement