Track Bookings: Difference between revisions
Jump to navigation
Jump to search
| Line 38: | Line 38: | ||
Settings > Booking Engine > Developer > Advanced HTML Settings > Confirmation Page Insert in HTML <HEAD> | Settings > Booking Engine > Developer > Advanced HTML Settings > Confirmation Page Insert in HTML <HEAD> | ||
The script will be installed in the head section of the booking confirmation page. [https://wiki.beds24.com/index.php?title=Template_Variables Template variables] can be used in this script to include information about the booking. | The script will be installed in the head section of the booking confirmation page. [https://wiki.beds24.com/index.php?title=Template_Variables Template variables] can be used in this script to include information about the booking. The following example includes the booking number [BOOKID] and price [PRICE] in the script. | ||
<script type='text/javascript'> | |||
ga('require', 'ecommerce'); | |||
ga('ecommerce:addTransaction', { | |||
'id': '[BOOKID]', | |||
'affiliation': 'BEDS24', | |||
'revenue': '[PRICE]' | |||
}); | |||
ga('ecommerce:addItem', { | |||
'id': '[BOOKID]', | |||
'name': 'Lodging', | |||
'category': 'Accomodation', | |||
'price': '[PRICE]', | |||
'quantity': '1' | |||
}); | |||
ga('ecommerce:send'); | |||
<script> | |||
===Custom booking confirmation page=== | ===Custom booking confirmation page=== | ||