dusanmiha

Enhanced Ecommerce Removed From Cart

May 11th, 2020
88
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': 'GBP',          // the currency which is currently used by a visitor
  7.         'remove': {                     // name of an action. In this case, always stays as remove 
  8.         'products': [                   // list of products a user has removed from cart
  9.             {                  
  10.                 'name': 'TBD (restaurant - meal name ex DUCK & WAFFLE - CORN RIBS)',      // name of a product that is currently viewed
  11.                 'id': 'TBD (ex 123456)',            // id (SKU) of a product (unique for each product for each of the restaurants)
  12.                 'price': '7.00',            // 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.)
  13.                 'brand': 'DUCK & WAFFLE',           // brand/vendor of a product
  14.                 'category': 'DUCK & WAFFLE/DUCK & WAFFLE',      // Product category of the item. Can have maximum five levels of hierarchy. restaurant/sub-menu-category (ex. clothes/shirts/t-shirts)
  15.                 'variant': 'TBD',       // product variant. If there are no variants, exclude this key from the dataLayer.push
  16.                 'quantity' : 1              // product quantity
  17.              }]
  18.         }
  19.     }
  20. });
  21. </script>
RAW Paste Data