CityLights Help Back to the app
Help centre

Website widget

Put a search box, an availability calendar or a Book now button on your own website.

What this page is for

If you already have a website, the widget brings your booking website into it. Guests search or pick dates on your site, then book on your booking website. Those bookings are recorded on the WIDGET channel, with the website they came from as the campaign source.

Who can use it

Get the website widget code and set where it may appear (by default Admin and Sales).

How to

  1. Copy the line under 1. Add this line once into your website, before the end of the page. Your web designer can do this in a minute.
  2. Copy a line from 2. Add a line where each widget should appear to the place on the page where the widget should show.
  3. For the calendar and the button, put a listing address from the list into data-listing.
  4. Optional: add data-lang="fr" to show the widget in one of your website languages, and data-title="..." to name it for screen readers.
  5. To limit which websites may show the widget, select Where it may appear and list their addresses.

Fields and columns

Field Meaning
Search box Where, check-in, check-out and adults. Opens the search results.
Availability calendar Two months of one listing. Free days link to the listing with that check-in date.
Book now button Opens the listing page.
data-listing The listing address (the end of its web address), from the list on this page.

Statuses and automation

Only published listings work in the calendar and the button. The widget shows prices in the guest's currency when the guest currency module is on. Every link adds utm_medium=widget, and the website it came from as utm_source.

Settings that change this page

Websites that may show the widget (module settings). Empty: any secure (https) website.

FAQs

Does the widget slow my website? No. It loads after your page and is a few kilobytes.

Can guests pay inside the widget? No, they always book and pay on your booking website, which keeps card details off other sites.

Troubleshooting

Problem What to do
The widget area stays empty Check the script line is on the page and the address in Where it may appear matches the website exactly, including https and www.
"Not found" inside the calendar or button The listing address is wrong, or the listing is not published.

Related pages