filipr27

GA4 - add_payment_info - next

Jun 1st, 2022 (edited)
163
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.     currency: 'USD',                              //Currency of the items associated with the event - Type: string
  6.     value: 8400.90,                               //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.     payment_type: 'Purchase Order',               //Selected payment method - Type: string
  9.     items: [{
  10.       item_name: 'ECLIPSE Blackoil Reservoir Simulation',      //Product Name - Type: string
  11.       item_id: '71274',                        //Product ID/SKU - Type: string
  12.       price: 4000.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.       item_brand: 'Oil and Gas Software',      //Product Brand - Type: string  
  16.       item_category: 'Schlumberger Software',  //Product Category - Type: string
  17.       item_category2: 'Indonesia',             //Product Sub-Category 1 - Type: string
  18.       item_category3: 'Jakarta',               //Product Sub-Category 2 - Type: string
  19.       item_variant: 'Foundation',              //Variant of the product - variant SKU/ID - Type: string
  20.       quantity: 1                              //Product quantity - Type: number
  21.     },{
  22.       // Another item.
  23.     }]
  24.   }
  25. });
Add Comment
Please, Sign In to add comment