Set up RateParity
Copy the following script tag in your websites' HTML, preferably at the bottom of the <head>
tag (just before the closing tag).
<script src="https://code.rateparity.com/versions/installer.min.js" defer></script>
warning
IF RATEPARITY IS NOT APPEARING
Try removing the script from optimization/cache plugins in website builders(Wordpress etc.)
The widget is configured to automatically display in the end user's default language. Furthermore, you have the option to modify this behavior by specifying the lang
parameter when embedding the script.
For instance, if you want to create a web page that showcases Italian content, you can include the following:
<script type="text/javascript" lang="it" src="https://code.rateparity.com/versions/installer.min.js" defer></script>
The language parameter must adhere to the ISO 639-1 nomenclature.
Set Up RateParity modules as Webapps
- Copy the following script tag into your page's HTML (for overiding the default module language, please refer to the "Set up RateParity" section):
<script type="text/javascript" src="https://code.rateparity.com/versions/installer.min.js" data-parent-id="the-div-id" data-widget="the-widget" defer=""></script>
Replace the
data-parent-id
attribute's value with the id of an html element that you have created in your page. This element will act as a container inside which Rateparity will render.Replace the
data-widget
attribute's value with the name of the Rateparity module you would like to embed, according to the following table:
Widgets
Name | Description |
---|---|
price-comparison | Super fast Integrated Booking Engine |
reviews | Review scores and details on your site to inspire user trust |
offers | Special Offers messaging feature |
quote | Take control of your hotel’s offline bookings |
vouchers | Voucher tools to offer discounted room rates or extra services, like spa treatments, dining, and more. |
giftcards | Prepaid codes that can be used as an alternative form of payment |
meetings | MICE Booking Engine |
Example
To embed the Reviews module in your page, create a <div id="example-container"></div>
element at the place in your HTML where you would like Rateparity to appear, and then paste the script tag in the page's <head>
.
The structure of your HTML should look like this:
<html>
<head>
<script type="text/javascript" src="https://code.rateparity.com/versions/installer.min.js" data-parent-id="example-container" data-widget="reviews" defer=""></script>
</head>
<body>
<div id="example-container"></div>
</body>
</html>
Set up the client API
Copy the following snippet at the beginning of the <head>
tag, or at least before any client API command is used.
This will ensure any client API commands used before the main Rateparity script has loaded will not fail and will all be executed when it does.
<script>
window.rptCommandQueue = window.rptCommandQueue || [];
window.rpt = function(){window.rptCommandQueue.push(...arguments);}
</script>
caution
If this step is skipped, any client API command used before RateParity has finished loading will not work.