filipr27

GA4 - add_shipping_info - ofmpec

Apr 28th, 2022 (edited)
124
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_shipping_info',
  4.   ecommerce: {
  5.     currency: 'USD',                                //Currency of the items associated with the event - Type: string
  6.     value: 13243.80,                                //The monetary value of the products in the cart - Type: number
  7.     coupon: 'coupon_name',                          //The coupon name/code associated with the event - Type: string
  8.     shipping_tier: 'Pickup and Delivery',              //Selected shipping option - Type: string
  9.     items: [{
  10.       item_name: 'REDA ESP - Gas Handler',             //Product Name - Type: string
  11.       item_id: 'Reda-Esp-Gas-Handler',                 //Product ID/SKU - Type: string
  12.       price: 11130.00,                                 //Product price - Type: number
  13.       currency: 'USD',                                 //Currency of the price that is collected - Type: string
  14.       discount: 0.00,                                  //Any discount associated with this product - Type: number
  15.       affiliation: 'sals',                             //Vendor - Type: string
  16.       item_brand: 'schlumberger',                      //Product Brand - Type: string  
  17.       item_category: 'Production',                     //Product Category - Type: string
  18.       item_category2: 'Electrical Submersible Pumps',  //Product Sub-Category 1 - Type: string
  19.       item_category3: 'REDA ESP - Gas Handler',                //Product Sub-Category 2 - Type: string
  20.       item_category4: 'Gas Volume Fraction 75%',                //Product Sub-Category 3 - Type: string
  21.       item_category5: 'item_category5',                //Product Sub-Category 4 - Type: string
  22.       item_variant: '102761535',                       //Variant of the product - variant SKU/ID - Type: string
  23.       quantity: 1                                      //Product quantity - Type: number
  24.     },{
  25.       item_name: 'Tiger Bullets',             //Product Name - Type: string
  26.       item_id: 'Tiger-Bullets-Lcm',                 //Product ID/SKU - Type: string
  27.       price: 2113.80,                                 //Product price - Type: number
  28.       currency: 'USD',                                 //Currency of the price that is collected - Type: string
  29.       discount: 0.00,                                  //Any discount associated with this product - Type: number
  30.       affiliation: 'miswaco',                             //Vendor - Type: string
  31.       item_brand: 'federal',                      //Product Brand - Type: string  
  32.       item_category: 'Drilling',                     //Product Category - Type: string
  33.       item_category2: 'Fluids',                    //Product Sub-Category 1 - Type: string
  34.       item_category3: 'Tiger Bullets',                //Product Sub-Category 2 - Type: string
  35.       item_category4: 'Units - 60',                //Product Sub-Category 3 - Type: string
  36.       item_category5: 'Pickup - Monahans, TX',                //Product Sub-Category 4 - Type: string
  37.       item_variant: 'M0017771-60-3',                       //Variant of the product - variant SKU/ID - Type: string
  38.       quantity: 1                                      //Product quantity - Type: number
  39.     }]
  40.   }
  41. });
Add Comment
Please, Sign In to add comment