Skip to main content

Customize the Online Booking Widget

To change how the online booking widget (Widget 2.0) looks and works on your website, add optional settings to its embed code. The embed code from the Preview online booking page has only the required parts, so you or your web developer add these settings by hand.

To customize the online booking widget, you need:

Add a Setting to the Widget Embed Code

Each online booking widget setting is an attribute that you add inside the <book-appointment-widget> tag of the embed code. To add a setting:

  1. Open the page of your website that has the widget embed code.
    ​

  2. Find the <book-appointment-widget tag.
    ​

  3. Add the setting inside the tag, after company-id, in the form name="value".
    ​

  4. Save and publish the page.

The widget uses the new setting the next time the page is loaded.

Example: this code sets the widget language to English and the button color to blue:

<script type="text/javascript" src="https://cdn.provet.com/vet-booking-portal-widget20.js"></script>
<book-appointment-widget company-id="COMPANY_ID" language="en" accent-color="#3B71CA"></book-appointment-widget>

In your own code, COMPANY_ID is already filled in when you copy the code from the Preview online booking page.

Online Booking Widget Settings

The table lists the optional settings you can add to the online booking widget embed code.

Setting

What it does

Example

clinic-id

Shows the online booking of one clinic location only. Clients skip the clinic location step. This setting is added for you when you select a clinic location from the Clinic location list on the Preview online booking page.

clinic-id="1"

language

Sets the language of the widget text. Supported languages: en, fi, nb, sv, da, fr and es. The default is en.

language="en"

accent-color

Sets the color of buttons and other parts of the widget, as a hex code. It overrides the color set in Vetera.

accent-color="#3B71CA"

view

Sets what the widget shows first: menu (the start menu, default), booking (the booking flow) or auto (the start menu on a phone, the booking flow on a computer).

view="auto"

prices-url

Adds a Prices link to the start menu. Use a full web address, or a path on your own website such as /prices.

menu-links

Adds your own links to the start menu, below Book an appointment. For more information, see Add Your Own Links to the Start Menu below.

See the section below

manage-appointments

Shows a Manage appointments link on the booking confirmation screen.

manage-appointments="https://my.yourclinic.com"

exact-location

Set to false to stop the widget from asking for the client's location. By default, the widget asks the client's browser for their location, so that clinic locations can be sorted by distance.

exact-location="false"

breed-selection-hidden

Set to true to hide the breed field in the booking form.

breed-selection-hidden="true"

width

Limits the width of the widget and centers it on the page. A width below 800 pixels is not recommended.

width="800px"

Add Your Own Links to the Start Menu

The menu-links setting adds up to 10 of your own links to the online booking widget start menu, below Book an appointment. Each link has:

  • name: the text of the link, shown exactly as you write it
    ​

  • url: the web address the link opens
    ​

  • icon (optional): the name of an icon from nordhealth.design/icons

Wrap the whole value in single quotes, as in this example:

menu-links='[
{ "name": "Health plans", "url": "https://yourclinic.com/health-plans", "icon": "file-invoice" },
{ "name": "Call us", "url": "https://yourclinic.com/contact", "icon": "generic-telephone" }
]'

If your website editor changes the quotes in the code, ask your web developer to set menu-links with JavaScript instead.

Why Does the Widget Show a Menu or a Book Button First on a Phone?

On a phone, the online booking widget opens the booking full screen. A browser only allows a page to go full screen after the visitor taps something, so the widget first shows the start menu or a Book button. On a computer, the widget can open the booking flow straight away if you add view="auto". Clients can close the full-screen booking at any time to return to your website.

Widget Language, Dates and Prices

The language setting of the online booking widget changes only the widget text. Dates, times and prices always follow the country your clinic is registered in, whatever language you choose.

See Also

Did this answer your question?