Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'eec.purchase', // name of an event. In this case, always stays as eec.purchase
- 'ecommerce': { // ecommerce object. This is the essential part of tracking. New EE data must always be pushed to this object
- 'purchase': { // name of an action. In this case, always stays as purchase
- 'actionField': {
- 'id': '155', // reservation id. required
- 'revenue': '1100.00', // total reservation value
- },
- 'products': [{ // list of properties a user has booked or inquired, in our case one property always
- 'name': 'Villa Sana', // name of the property
- 'id': 'ET-0028', // id of a property
- 'price': '1100.00', // total reservation value
- 'category': 'Villa with pool', // category of a property
- 'dimension1': '21.04.2021.', // arrival date
- 'dimension2': '30.04.2021.', // departure date
- 'dimension3': 'Reservation', // conversion type, can be Reservation or Inquiry
- 'dimension4': 'Yes', // pet friendly status checked, can be Yes or No
- 'dimension5': 'April', // booking month, month of arrival date
- 'dimension6': '2021', // booking year, year of arrival date
- 'dimension7': 'Rovinj', // location where property is located
- 'metric1': 6, // number of persons
- 'metric2': 4, // number of adults
- 'metric3': 1, // number of children (to 18)
- 'metric4': 1, // number of children (to 12)
- 'metric5': 0, // number of babies
- 'metric6': 9, // number of total nights
- 'quantity' : 1 // property quantity, always 1 in our case
- }]
- }
- }
- });
- </script>
Add Comment
Please, Sign In to add comment