dusanmiha

VIP - EEC - Remove from Cart

Nov 26th, 2020 (edited)
78
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.removeFromCart',          // name of an event. In this case, always stays as eec.removeFromCart
  5.     'ecommerce': {                  // ecommerce object. This is the essential part of tracking. New EE data must always be pushed to this object
  6.         'currencyCode': '{{currency}}',         // the currency which is currently used by a visitor  RSD
  7.         'remove': {                     // name of an action. In this case, always stays as remove
  8.             'actionField': {           
  9.                 'list': '{{product List name}}'         // optional. name of a list from which the product was added to a cart  
  10.               },       
  11.             'products': [                   // list of products a user has added to cart
  12.             {                  
  13.                 'name': '{{product name}}',      // name of a product that is currently viewed
  14.                 'id': '{{product ID}}',            // unique id (SKU) of a product
  15.                 'price': '{{product price}}',            // price of a product (The price of one item. The value must not include anything else except number separated by a decimal point. Don't use a comma as the separator, and don't include any currency symbols.)
  16.                 'brand': '{{product brand}}',           // brand/vendor of a product
  17.                 'category': '{{product category}}',      // Product category of the item. Can have maximum five levels of hierarchy. category/sub-category (ex. device/mobile-phone/samsung/galaxy20)
  18.                 'variant': '{{product variant}}',       // product variant. If there are no variants, exclude this key from the dataLayer.push
  19.                 'quantity' : '{{product quantity}},              // product quantity
  20.                 'dimension20': '{{tariff}}', //optional. A Product-scoped Custom Dimension for index number N. If there are no variants, exclude this key from the dataLayer.push
  21.                'metricN': '{{custom product metric}}' //optional. A Product-scoped Custom Metric for index number N. If there are no variants, exclude this key from the dataLayer.push
  22.             }]
  23.         }
  24.     }
  25. });
  26. </script>
RAW Paste Data