Skip to content

Install the script

Before you start

Ask the hotel for two things. Both are in Tape Chart Link, under Booking engine.

  • The property number — nine digits. It is public: it goes into the script tag.
  • Your site’s address on the list of allowed origins (Booking engine → Firewall), written like https://www.yourhotel.com. Add http://localhost:3000 there too while you develop. On a site that is not listed the script loads, but the browser refuses its requests.

The steps

  1. Put the script on every page that shows a component, inside <head>.

    <script src="https://link.tape-chart.com/widget/v1.js" data-property="YOUR_PROPERTY_NUMBER" defer></script>
  2. Make a booking page at /booking and put the booking window on it. The search form, the book buttons and every booking link lead here.

    <div data-pms-booking="window"></div>
  3. Make an account page at /account and put the guest area on it. Sign-in links in the hotel’s emails open here once the hotel has set this page as its account page (Booking engine → Configuration).

    <div data-pms-booking="portal"></div>
  4. Put a search form on the home page — the ready one, or your own form with our calendar.

    <div data-pms-booking="search-form" data-promo="off"></div>

That is a working booking engine. Everything after this is choice: more components, your own markup, your own look.

Other paths

If your booking or account page lives somewhere else, say so on the script tag:

<script src="https://link.tape-chart.com/widget/v1.js" data-property="YOUR_PROPERTY_NUMBER" data-booking-path="/en/book" data-account-path="/en/my-stay" defer></script>

The script tag’s attributes

AttributeGoes onValuesWhat it does
data-propertythe script tag9 digitsRequired. The property's public number. Without it the script draws nothing and logs a warning.
data-booking-paththe script taga path — default "/booking"The page of your site that carries the booking window. The search form, the book button, every data-pms-book link and bookUrl() lead there.
data-account-paththe script taga path — default "/account"The page of your site that carries the guest area. The account circle and the menu link there.
data-themethe script tag"light" | "dark" | "auto" | "page"The look the components start in. light or dark: that one. auto: the visitor's device. page: your site's own switch, followed live. Left out: light, unless the property's branding is dark. Except under page, a guest's pick on our theme icon wins.
data-localethe script tag"en" | "bg"The language of the components. Left out, they follow the page's own lang attribute, live. A guest's pick on our language icon wins over both.
data-consentthe script tag"granted" | "denied"Your site's decision about marketing tags, for a page with no consent-manager script. window.pmsBookingConsent wins over it.
data-analyticsthe script tag"off"off: measure nothing at all on this site — no session, no events, no tags.
data-assets-urlthe script taga URLWhere the room photographs are loaded from. Normally left out: the property says where.
data-base-urlthe script taga URL on the script's own originWhere the script calls our API. Honoured only when it is the origin the script itself was loaded from; anything else is ignored with a warning. Normally left out.

Check that it works

  • The browser console shows no warning from the script. A missing or wrong data-property logs one and nothing is drawn.
  • <html> carries data-pms-ready once the script has bound the page.
  • window.pmsBooking exists — see JavaScript.