How can I integrate the booking engine into my website

Updated 15th August 2014

The Accubook Booking engine can be integrated into any website using javascript.

Use the following steps.

  • Include the following code int the HEAD on each page that you want the Availabilty Search to appear on and on the page that will show the booking form:

    You will need to change the following code slightly.

    update accubook_Business and accubook_Site with the information provided to you by AccuBook and update accubook_SearchPage to the filename of the page you want to display the booking form on. e.g.

    var accubook_Business="A Sample Hotel"; //provided by AccuBook
    var accubook_Site="A Sample Website"; //provided by AccuBook
    var accubook_SearchPage="bookonline.asp"; // change to the address of the page on your site which has the writeAccuBookIFrame code (this can also be a fqdn e.g. http://www.yourhotel.com)

    <link rel="stylesheet" href="https://reservations.accubook.net/remote/accubook.css"/>
    <script type="text/javascript">
    var accubook_Business="Your AccuBook Business Name Here"; //provided by AccuBook
    var accubook_Site="Your AccuBook Site Name Here"; //provided by AccuBook
    var accubook_SearchPage="booknow.html"; // the filename in your website that will show the search results
    </script>
    <script type="text/javascript" src="https://reservations.accubook.net/remote/BookingEngine.ashx"></script>

  • Add the following code onto the page where you want the search form to appear

    <script type="text/javascript">

       writeAccuBookSearchForm();
       //if you wish to show a promotion code box on your site, 
       //use the following instead of the line above
       //writeAccuBookSearchFormWithPromoCode();

    </script>
    <noscript>
    <!--
    Enable Javascript to book online.
    -->
    </noscript>

  • Add the following code on the page you want to display the booking form IFrame, this page should have the same name as the accubook_SearchPage setting you created in the HEAD of the page as described above.

    If you wish to Track conversions with Google Analytics
    Following the following guide to link your Google Analytics and Google Adwords accounts, and change the code below as described in the code snippet.

    http://support.accubook.net/KB/a396/conversion-tracking-in-google-analytics-and-adwords.aspx

    <script type="text/javascript">

    writeAccuBookIFrame();
    // To use Google Analytics Conversion Tracking 
    // uncomment the following line and comment the line above 
    // Analytics Asynchronous snippet must be included on the page for this to work
    //writeGAAccuBookIFrame();

    </script>
    <noscript>
    <!--
    Enable Javascript to book online.
    -->
    </noscript>

Displaying Package Offers and Gift Vouchers

If you wish to display packages, you can create a link to the following address, which will display the packages available.
<accubokSearchPage>?view=packages e.g. bookonline.asp?view=packages

to display gift vouchers
<accubokSearchPage>?view=vouchers e.g. bookonline.asp?view=vouchers

Previous
Previous

How to make somebody an Admin of your Facebook Page

Next
Next

Conversion tracking in Google Analytics and Adwords