Advertisement
JITreviso

ga4_eec | purchase

Aug 21st, 2022
724
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: 'purchase',            // name of the event. In this case, it always must be purchase
  4.   ecommerce: {
  5.     currency: 'ARS',
  6.     value: 325.00,                       // order total (price of all products + shipping)
  7.     tax: 25.00,                          // tax
  8.     shipping: 200.00,                 // shipping costs
  9.     affiliation: 'Cigarrillos Online',      // affiliation (e.g. affiliate id, name of the store, etc.)
  10.     transaction_id: 'CIGALO19283',           // transaction id
  11.     coupon: 'Black_Friday22',          // if coupon was applied to the order, include it here          
  12.         items: [{                           // an array with all products (that were in a cart when the checkout began)
  13.       item_name: 'MARLBORO RED SUMMIT',           // insert an actual product name
  14.       item_id: 'MLB1985',              // insert an actual product ID
  15.       price: '325.00',                   // insert an actual product price. Number or a string. Don't include currency code
  16.       item_brand: 'Marlboro',            // insert an actual product price
  17.       item_variant: 'RED SUMMIT',             // insert an actual product variant
  18.       quantity: '1'                     // product quantity in the cart
  19.     },{
  20.       item_name: 'JUMBO PACK PHILIP MORRIS MIX&MATCH',
  21.       item_id: 'PMI_JUM_PACK2938',
  22.       price: '540.00',
  23.       item_brand: 'Philip Morris',
  24.       item_variant: 'JUMBO PACK',
  25.       quantity: '1'
  26.     }]
  27.   }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement