Set up your booking engine

Adding Flip.to to your booking engine requires two snippets of code:

Before you begin

  • You'll need your unique IDs, which you should have received by email. If not, ask our Customer Success team.

If your website and booking engine are on the same domain, the instructions below apply only to your booking engine pages. A different snippet is required for your website pages.


Every page snippet

The following snippet should be modified to pass in the appropriate values (tokens are typically set in place of the actual values), and should be included in the <head> tag of every page of the booking engine, including the confirmation page.

For single page applications, this snippet should only be loaded at application start, not on virtual pageviews.

<!-- Flip.to - Booking Engine Integration -->
<script>
!function(b,e,i){(b[e]=b[e]||[]).push({flipto:i, event: 'flipto.configuration.load'})}(window,'fliptoDataLayer',{
	bookingEngine: 'BB',
	companyCode: 'XX',
	code: 'YYYY',
	language: 'en'

});
</script>
<script async src='https://integration.flip.to/K2X4KDP'></script>
<!-- Flip.to - End Booking Engine Integration -->
FieldDescription

bookingEngine

The Flip.to string to define the booking engine used. Please contact Customer Success if you need the name to use for your booking engine vendor.

companyCode

The internal Flip.to company code.

code

Internal property code used by the booking engine. Set your own internal code used by the engine, and let your account manager know this code.

language

The language ANSI code the engine currently uses to display text. For English use 'en', French 'fr', etc. Refer to the complete list of language codes. Use the ISO 639-1 Code for the language parameter. Optionally, a culture name can be used as well. For example, this can be set to 'en-US' or 'en_US'.


Confirmation page snippet

The following snippet should be modified to pass in the appropriate values and should be included in the <head> tag of the confirmation page to run once the guest has completed their reservation.

Most booking engines support dynamic tokens (i.e. %FirstName%) that allows the hotel to display the confirmation page with the guest’s details. If you’re not sure what these tokens are, please contact your booking engine’s support team or introduce our Customer Success team to them.

The confirmation page should include both the Every page snippet and the Confirmation page snippet (the order doesn't matter).

<!--Flip.to - Confirmation Page Start-->
<script>
	!function(n,e,w){
		w.eventData={category:'Booking_Engine',action:'Load',value:w.amount};
		(n[e]=n[e]||[]).push({flipto:w,event:'flipto.confirmation.load'});
	}(window,'fliptoDataLayer',
	{
		bookingEngine: 'BB',
		companyCode: 'XX',
		code: 'YYYY',
		confirmation: '67890',
		loyalty: '12333322',
		first: 'John',
		last: 'Smith',
		email: 'jsmith@flip.to',
		phone: '(212) 123-4567',
		startDate: '2022-4-10',
		endDate: '2022-4-13',
		guests: 5,
		adults: 3,
		children: 2,
		type: 'KING',
		rateCode: 'BAR',
		language: 'en',
		currency: 'USD',
		amount: 1234.12,
		addonAmount: 234.56,
		dateFormat: 'yyyy-M-d'
	});
</script>
<!--Flip.to - Confirmation Page End-->
FieldDescription

bookingEngine

The Flip.to string to define the booking engine used. Please contact Customer Success if you need the name to use for your booking engine vendor.

confirmation

Guest’s confirmation number.

loyalty

Guest's loyalty program number, if any.

first

Guest’s first name.

last

Guest’s last name.

email

Guest’s email address.

phone

Guest’s phone number.

startDate

Guest’s check-in date. This should be formatted as 'yyyy-M-d' (i.e. 2016-5-15). If you prefer a different date format use the dateFormat field.

endDate

Guest’s check-out date. See start date for specifics.

guests

The total number of guests.

adults

The total number of adult guests.

children

The total number of children guests.

type

The guest’s room type, if available. Otherwise leave it blank. This should include the booking engine internal code, and not the room type description.

rateCode

The guest’s rate code, if available; otherwise blank

groupCode

The guest’s group code (or block code), if available. Otherwise leave it blank.

promoCode

The guest’s promo code, if available. Otherwise leave it blank.

language

The language ANSI code the guest has used to make the reservation. For English use 'en', French 'fr', etc. Refer to the complete list of language codes. Use the ISO 639-1 Code for the language parameter. Optionally, a culture name can be used as well. For example, this can be set to 'en-US' or 'en_US'.

currency

The 3 character currency code the guest has used to make the purchase. A complete list of currency codes can be found here. For instance 'USD' for US dollars.

amount

The total pre-tax amount used for the room purchase based on the defined currency. Amount should be supplied as a valid number including a decimal point if appropriate.

addonAmount

Optional

The total amount used for any add-on products and/or services. Amount should be supplied as a valid number including a decimal point if appropriate.

dateFormat

Optional

Specify a different date format for the startDate and endDate parameters. All date fields should be set using the default format:

'yyyy-M-d'.

However, you can define your preferred format instead with this field. For example, if you want to use 12/31/2016 the dateFormat should be set to: 'M/d/yyyy'.


Optional Dynamic Configuration

<!-- Flip.to - Configuration -->
<script>
  window.ftParams = {
  "_ga-ft"= "................."
  "enableAdobeCrossDomain": true
}
</script>
<!-- Flip.to - Configuration  -->
FieldDescription

_ga-ft

Page persistent access to the value of the _ga-ft url parameter. Used as a fallback in case the _ga-ft url parameter is removed by the booking engine.

enableAdobeCrossDomain

Flag denoting whether Flip.to should attempt to add adobe analytics cross-domain parameters to outbound links. Used to enable cross-domain tracking for Adobe analytics.


Troubleshooting: Conflicting website code snippet firing on engine pages

Confirm the trigger for the Website GTM Tag is firing on all pages of the website, but excludes firing on all pages of the TravelClick engine. The tag triggers should look like this:

Last updated