RezTrip
Adding Flip.to to your RezTrip booking engine is done in just two steps.
Before you begin: you'll need your Flip.to companyCode, which you should have received by email. If not, ask our Customer Success team.
Step 1: Booking engine snippet
This is the first of two snippets to add to your RezTrip booking engine.
Copy and paste the snippet below into <head> tag of the booking engine
Replace
XXwith your Flip.to companyCode (be sure to keep the single quotes)Replace
YYwith your RezTrip property code (be sure to keep the single quotes)
<!-- Flip.to - Booking Engine Integration -->
<script>
!function(b,e){(b[e]=b[e]||[]).push({flipto:{
bookingEngine: 'RezTrip',
companyCode: 'XX',
code: 'YY'
}})}(window,'fliptoDataLayer');
</script>
<script async src='https://integration.flip.to/K2X4KDP'></script>
<!-- Flip.to - End Booking Engine Integration -->Step 2: Confirmation page snippet
This snippet should be added only to your RezTrip confirmation page.
Copy and paste the snippet below into <head> tag of the confirmation page
Replace
XXwith your Flip.to companyCode (be sure to keep the single quotes)Replace
YYwith your RezTrip property code (be sure to keep the single quotes)
<!-- Flip.to - Confirmation Page -->
<script>
var guestDetails = document.querySelectorAll('[headers=summary_reservation_guest_details]');
var fullNameAndEmail = guestDetails[0].innerText.split("\n");
!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: 'RezTrip',
companyCode: 'XX',
code: 'YY',
confirmation: quoteList[0].confcode,
first: fullNameAndEmail[0].trim().split(" ")[0],
last: fullNameAndEmail[0].trim().split(" ")[1],
email: fullNameAndEmail[1].trim(),
startDate: quoteList[0].sd,
endDate: quoteList[0].ed,
type: quoteList[0]['rt'],
rateCode: quoteList[0]['rc'],
language: 'en',
currency: quoteList[0].cc,
amount: rtTOTALCOST,
addonAmount: rtADDONVALUE_0
});
</script>
<!-- Flip.to - End Confirmation Page -->Last updated