Developer documentation · Hotel Map widget
Widget integration & wide scale embedding
Supercharge your attendance by showing accommodations near your venue. Revolugo’s Hotel Map lets your attendees browse and book hotels directly from your website.
Quick start
Embed the Hotel Map in minutes
Help your attendees find the best deal during your event. Embed our high-converting Hotel Map on your event’s accommodation page, then sit back and relax.
No redirection
Attendees browse and book hotels around your venue without leaving your website.
One script tag
Copy and paste a single snippet wherever the map should appear in your HTML.
More revenue
Every booking is tracked back to your organization through your tracking token.
Standard integration
Integrate the widget with a Widget ID
1. Paste the script tag
Copy and paste the following script tag anywhere in your HTML, at the spot where you want the hotel map to be displayed.
2. Replace the identifiers
The values between brackets must be replaced by the unique identifiers provided by our operations team:
[TRACKING_ID]is a tracking token related to your organization.[WIDGET_ID]is the identifier of your event.
3. Override when needed
You can also add other attributes to the script tag. Those attributes take precedence over the settings attached to the widget ID. The exhaustive list is described below.
Wide scale integration
Hotel Map with custom settings
Generate a widget dynamically and customize its settings by passing additional information to the script tag, such as the latitude and longitude of your event or its dates. Options are specified through attributes of the HTML script tag.
Ideally, inject context data (check-in/check-out dates, location, etc.) and other data attributes from your backend’s template renderer, e.g. <%= latitude %> with Ruby on Rails or <?php echo $latitude ?> with PHP.
Here is a snippet exposing the exhaustive list of customizable attributes:
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Reference
Attribute index
Every attribute is optional unless stated otherwise. Attributes passed on the script tag override the settings attached to your Widget ID.
data-latitude
data-longitude
Event location
Coordinates of the event venue
data-address
Event location
Venue address, geocoded to place the venue marker
data-check-in-date
data-check-out-date
Dates
Initial stay dates used to poll hotel availability
data-name
Event details
Widget name shown in the venue info window
data-description
Event details
Short event description shown in the venue info window
data-event-start-date
data-event-end-date
Event details
Event dates, highlighted in the datepicker
data-marker
Event details
Event logo used as the venue marker on the map
data-logo
Event details
Event logo displayed on the hotel view
data-color-widget-main-1
Widget colors
Main color of the widget (hex, without #)
data-color-widget-main-2
Widget colors
Secondary color of the widget (hex, without #)
data-tid
Booking tracking
Your organization’s tracking token
data-lang
Widget settings
Default language of the widget content
data-currency
Widget settings
Default currency for displayed prices
data-height
Widget settings
Height of the widget on your page (px, vh, em)
data-adult-count
Widget settings
Number of adults for the initial search
data-room-count
Widget settings
Number of rooms for the initial search
data-map-first-on-mobile
Widget settings
Show the map view first on mobile
data-wid
Widget settings
Unique identifier of your event
data-c-*
Quick checkout
Customer personal info to prefill checkout
data-o-*
Quick checkout
Customer organization info for invoices
data-metadata-*
Additional metadata
Custom key/values stored with each booking
Attribute details
Event location
Latitude & longitude
data-latitude data-longitude
To make the hotel map point directly to your event’s venue, provide the latitude and longitude of the event. If one of the two attributes is missing, both are ignored.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Address of your event’s venue
data-address
The address of your event’s venue, used as the initial position of the Hotel Map’s venue marker.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Address vs. geolocation
When
data-addressis provided, our backend attempts to convert it into coordinates using a third-party geocoding service.If geocoding fails, we fall back to
data-latitudeanddata-longitude.
We strongly recommend prioritizing data-latitude and data-longitude. Geocoding may fail or return incorrect locations unless the address is highly precise (street, zip code, city and country). Use data-address only when you cannot provide precise coordinates.
Attribute details
Dates
Check-in & check-out dates
data-check-in-date data-check-out-date
The initial check-in and check-out dates of the widget, used to poll hotel availabilities.
Format YYYY-MM-DD · Check-in default current date · Check-out default check-in + 1 day
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Event details
Name
data-name
The name of your widget. It is displayed in the widget information window on the Hotel Map, when the venue marker is hovered.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Description
data-description
The description of your event, displayed in the widget information window on the map when the venue marker is hovered. Keep it to one short sentence.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Event start & end dates
data-event-start-date data-event-end-date
Provides the dates of the event to the widget. Red ticks are added under each date of the range in the datepicker, giving your customers visual feedback on your event dates.
Format YYYY-MM-DD
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Venue map marker
data-marker
Show your event’s logo as the map marker for the event location. Provide the URL of the image only. It makes the event clearly visible on the map without hiding content.
Recommended size 70 × 70 px
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Event logo
data-logo
Show your event’s logo on the hotel view. Provide the URL of the image only.
Recommended size 512 × 512 px
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Widget colors
Widget main color
data-color-widget-main-1
Controls the main color of the widget.
Default 007FFF · Format hex, no #
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Widget secondary color
data-color-widget-main-2
Controls the secondary color of the widget.
Default 45DCA4 · Format hex, no #
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Booking tracking
Tracking token
data-tid
The tracking token ID assigned to your organization to track your earnings. Reach out to us by email or chat to obtain it.
This token is unique to your organization and lets us attribute every booking made through a Revolugo widget you integrated on a website.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Widget settings
Language
data-lang
Controls the default language of the widget content. If not provided, the user’s browser language is used.
en-US English · fr-FR French · Default browser language
Script attributes
Currency
data-currency
Controls the default currency used to display prices. If not provided, the currency of the user’s IP address country is used.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Supported currencies (136)
AED · AFN · ALL · AMD · ANG · AOA · ARS · AUD · AWG · AZN · BAM · BBD · BDT · BGN · BIF · BMD · BND · BOB · BRL · BSD · BWP · BZD · CAD · CDF · CHF · CLP · CNY · COP · CRC · CVE · CZK · DJF · DKK · DOP · DZD · EGP · ETB · EUR · FJD · FKP · GBP · GEL · GIP · GMD · GNF · GTQ · GYD · HKD · HNL · HRK · HTG · HUF · IDR · ILS · INR · ISK · JMD · JPY · KES · KGS · KHR · KMF · KRW · KYD · KZT · LAK · LBP · LKR · LRD · LSL · MAD · MDL · MGA · MKD · MMK · MNT · MOP · MRO · MUR · MVR · MWK · MXN · MYR · MZN · NAD · NGN · NIO · NOK · NPR · NZD · PAB · PEN · PGK · PHP · PKR · PLN · PYG · QAR · RON · RSD · RUB · RWF · SAR · SBD · SCR · SEK · SGD · SHP · SLL · SOS · SRD · STD · SVC · SZL · THB · TJS · TOP · TRY · TTD · TWD · TZS · UAH · UGX · USD · UYU · UZS · VND · VUV · WST · XAF · XCD · XOF · XPF · YER · ZAR · ZMW
Height
data-height
Controls the height of the widget in your event’s web page. The widget always takes the whole available width, so we highly recommend placing it where the window is wide for a more user-friendly display.
Units px · vh · em
Script attributes
Adult count
data-adult-count
At initial load, the widget displays offers for this number of adults.
Default 1
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Room count
data-room-count
At initial load, the widget displays offers for this number of rooms. The room count cannot be greater than the adult count.
Default 1 · Max adult count
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Map view on mobile
data-map-first-on-mobile
At initial load on mobile / responsive screens, the widget displays the hotel offers map view by default.
Values true · false · Default true
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Widget ID
data-wid
The unique identifier of your event in our system. It is associated with pre-defined widget settings that are applied automatically. Other attributes described here override those defaults. An unrecognized or missing widget ID is ignored.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Quick checkout
If you already know your customer’s personal information before displaying the widget, activate the quick checkout by passing it as attributes of the script tag. Your customers can then book a hotel room in the blink of an eye.
Customer personal info
data-c-firstname data-c-lastname data-c-salutation data-c-email data-c-nationality data-c-phone
The attributes required to activate the quick checkout:
Salutation dr · miss · mr · mrs · ms · prof
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Customer organization info
data-o-name data-o-vat data-o-address data-o-city data-o-state data-o-zip data-o-country
These attributes can be passed along with the customer information so the widget can generate invoices for your customer’s reservation.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Attribute details
Additional metadata
Custom metadata
data-metadata-xxxxx
Reconcile bookings made through the widget with your own customers by passing custom metadata attributes to the script tag, for instance the ID in your system of the customer who booked a hotel room.
These custom data attributes are merged into one JSON object stored along with the customer booking data.
Script attributes
Widget direct URL
⚠ Query string must be URL-encoded
Metadata keys are stored and returned snake_cased by our Booking API.
Script attributes
Stored & returned as
Need your tracking token?
Our team provides your Tracking ID and Widget ID and helps you with the integration.
Contact us
