Advertisement
LouisDon

eec.purchaseWMF

Dec 11th, 2019
479
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',                // name of an event. In this case, always stays as eec.purchase
  5.     'ecommerce': {                          // ecommerce object. This is the essential part of tracking. New EE data must always be pushed to this object
  6.         'purchase': {                       // name of an action. In this case, always stays as purchase
  7.             'actionField': {
  8.                 'id': '155',                // order id. required
  9.                 'affiliation': 'affiliate', // name of the affiliate. or affiliate id
  10.                 'revenue': '50.00',         // order revenue without taxes
  11.                 'tax':'12.00',              // taxes (excluding shipping)
  12.                 'shipping': '12.00',        // shipping cost
  13.                 'coupon': 'SUMMER20',        // coupon code used in this transaction
  14.                 'couponType': '',            // dataLayer Variable (Rabatt-Aktionen)
  15.                 'checkoutCoupon': '',        // true/false
  16.                 'paybackCoupon': '',         // dataLayer Variable  
  17.                 'paybackNumber': '',          // dataLayer Variable
  18.                 'paymentMethode': '',          // dataLayer Variable
  19.                 'shippingCountry': '',          // dataLayer Variable
  20.                 'shippingZip': '',          // dataLayer Variable
  21.                 'shippingCity': '',          // dataLayer Variable
  22.                 'billingCountry': '',          // dataLayer Variable
  23.                 'billingZip': '',          // dataLayer Variable
  24.                 'billingCity': ''          // dataLayer Variable
  25.             },
  26.             'products': [{                  // list of products a user has purchased
  27.                 'name': 'WMF Profi Plus Multipresse, 35x 13cm',      // name of a product that is displayed. Always include it.
  28.                 'id': '',               // id of a product. Always include it. Hier CMMF Nummer.
  29.                 'price': '62.00',              // price of a product
  30.                 'brand': 'WMF',             // brand/vendor of a product
  31.                 'category': 'Küchenhelfer',          // category of a product
  32.                 'quantity': 1,
  33.                 'dimension56': '',            // A Product-scoped Custom Dimension for index number N (old SKU)
  34.                 'dimension57': '',            // A Product-scoped Custom Dimension for index number N (Magento_Id)
  35.                 'dimension58': '',            // A Product-scoped Custom Dimension for index number N (In/Out of Stock)
  36.                 'dimension59': ''            // A Product-scoped Custom Dimension for index number N (Is Club Sale - true/false)
  37.                
  38.              }]
  39.         }  
  40.   }
  41. });
  42. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement