Booking Page/Google Ecommerce

From Booking Automation Wiki
Jump to: navigation, search


This page explains how to install Google Ecommerce or other conversion tracking scripts.
The exact scripts to be installed are supplied by your tracking service. Check their help pages for the latest version.

Page Tracking

To install a script for google analytics or ecommerce on every page go to SETTINGS -> BOOKING PAGE -> DEVELOPERS "Advanced HTML Settings" and enter your Google Script in the field "Insert In HTML HEAD". This will be installed in the head section of all booking pages.


Conversion Tracking

To install the conversion tracking script which reports booking information go to SSETTINGS -> BOOKING PAGE -> DEVELOPERS "Advanced HTML Settings" and enter your Google Tracking Script in the field "Confirmation Page Insert in HTML HEAD". This will be installed in the head section of the booking confirmation page.

Template variables can be included in this script to include information about the booking which has just been made. 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': 'BookingAutomation',
 'revenue': '[PRICE]'
});
ga('ecommerce:addItem', {
 'id': '[BOOKID]',            
 'name': 'Lodging',
 'category': 'Accomodation',  
 'price': '[PRICE]',
 'quantity': '1'
});
ga('ecommerce:send');
<script>


The booking page is on the domain www.BookingAutomation.com so you may need to enable multiple domain settings in Google.