Integrate the widget with your website
This page is for whoever builds your site. Beyond the copy-paste integration described in Install the widget on your website, the widget opens from your own buttons, pre-fills with a booking context, and can bring the guest back to your site after booking.
These integrations are code. Their full reference — the ServiceWidget JavaScript
API, the data-* attributes, the URL parameters, the events, and recognising a
guest already signed in — lives in the developer documentation, not here. Hand this
page to whoever manages your site.
The developer documentation
Section titled “The developer documentation”Everything is gathered at docs.useservice.app:
- Add the widget in JavaScript
— load the widget with a script or drive it with
ServiceWidget.create(), opening and closing it from your buttons. - Choosing an integration — compare the display modes and what each one can carry.
- Passing context — pre-position the date, time, party size or seating area.
- Deep links — carry that same context in a URL, for an email, an SMS or a QR code.
- Identifying the guest — sign a token so the widget knows who is booking, and manage the return domains back to your site.
- Events — react in your own code when a reservation is created or confirmed.
Never pass personal contact details in a URL: the name, email and phone go through the signed channel described in Identifying the guest.