SandroBabic

EEC - Purchase - Euro Tours

Mar 27th, 2021 (edited)
303
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',                // reservation id. required
  9.                 'revenue': '1100.00',         // total reservation value
  10.             },
  11.             'products': [{                  // list of properties a user has booked or inquired, in our case one property always
  12.                 'name': 'Villa Sana',      // name of the property
  13.                 'id': 'ET-0028',           // id of a property
  14.                 'price': '1100.00',          // total reservation value
  15.                 'category': 'Villa with pool',      // category of a property
  16.                 'dimension1': '21.04.2021.',      // arrival date
  17.                 'dimension2': '30.04.2021.',      // departure date
  18.                 'dimension3': 'Reservation',      // conversion type, can be Reservation or Inquiry
  19.                 'dimension4': 'Yes',      // pet friendly status checked, can be Yes or No
  20.                 'dimension5': 'April',      // booking month, month of arrival date
  21.                 'dimension6': '2021',      // booking year, year of arrival date
  22.                 'dimension7': 'Rovinj',      // location where property is located
  23.  
  24.  
  25.                 'metric1': 6,      // number of persons
  26.                 'metric2': 4,      // number of adults
  27.                 'metric3': 1,      // number of children (to 18)
  28.                 'metric4': 1,      // number of children (to 12)
  29.                 'metric5': 0,      // number of babies
  30.                 'metric6': 9,      // number of total nights
  31.                 'quantity' : 1              // property quantity, always 1 in our case
  32.              }]
  33.         }  
  34.   }
  35. });
  36. </script>
Add Comment
Please, Sign In to add comment