Advertisement
prabapro

EEC Purchase Event - pigeonsdontcry.com

Mar 21st, 2021 (edited)
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. window.dataLayer = window.dataLayer || [];
  3. window.dataLayer.push({
  4.   event: 'eec.purchase',
  5.   ecommerce: {
  6.     currencyCode: 'EUR',
  7.     purchase: {
  8.       actionField: {
  9.         id: '1115',                 //Woocommerce order number
  10.         affiliation: '',            //leave this blank
  11.         revenue: '40.00',           //Total order value - Either number or string
  12.         tax: '5.00',                //Tax value - Either number or string
  13.         shipping: '5.00',           //Tax value - Either number or string
  14.         coupon: 'demo coupon'       //Coupon or discount code
  15.       },
  16.       products: [{
  17.         id: '1086',                 //Procduct ID
  18.         name: 'Antwerp',            //Product Name
  19.         category: 'Poster',         //Woocommerce product category
  20.         variant: 'Text',            //If variable product, otherwise leave blank
  21.         brand: 'Pigeons',           //Leave blank if brand is not available
  22.         quantity: 2,                //Product quantity - must be in integer
  23.         price: '3.50'               //Product price in string
  24.       },{
  25.         id: '1087',                 //Procduct ID
  26.         name: 'Antwerp another',    //Product Name
  27.         category: 'Poster',         //Woocommerce product category
  28.         variant: 'Text',            //If variable product, otherwise leave blank
  29.         brand: 'Pigeons',           //Leave blank if brand is not available
  30.         quantity: 1,                //Product quantity - must be in integer
  31.         price: '5.00'               //Product price in string
  32.       }]
  33.     }
  34.   }
  35. });
  36. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement