Docs

Add reservations to your website

Let guests book a table wherever they find you - with a simple link, or with the booking form embedded right on your site.

Personalise this guide

Paste your booking link and pick a language - every code snippet below, and the AI handoff document, will be ready to copy as-is.

Introduction

Every DineSpot restaurant gets a hosted booking page. Guests pick a party size, date and time, see live availability, and their reservation lands straight in your dashboard - with confirmation emails, SMS reminders and optional card guarantees handled for you.

There are two ways to bring it to your website. You can use either, or both together:

Option 2

Embed the booking form

Show the booking form right on your own page. Only the form itself appears - no background or extra page around it - and it adjusts its height as guests move through each step, so there's never an inner scrollbar.

1. Paste this where the form should appear
HTML
<div data-dinespot="YOUR_BOOKING_HASH" data-lang="en"></div>
<script src="https://dinespot.si/embed.js" async></script>

Add the <script> line once per page, even if you place several forms.

2. That's it - here's how it looks
Live previewDemo restaurant
Options
AttributeDefaultDescription
data-dinespotRequiredYour booking hash - the last part of your booking link.
data-langsiLanguage of the form. Any of the 14 supported languages.
data-max-width600pxMaximum width. The form always fills its container up to this width and stays centered.
data-titleBook a tableAccessible title for screen readers.
Can't add scripts? Use a plain iframe

Some site builders only allow an iframe. It works the same, but can't resize itself - so it uses a fixed height that fits every step.

HTML
<iframe
  src="https://dinespot.si/book/YOUR_BOOKING_HASH?embed=1&lang=en"
  title="Book a table"
  allow="payment"
  style="width:100%;max-width:600px;height:900px;border:0;display:block;margin:0 auto;color-scheme:dark;"
></iframe>
Track completed bookings (optional)

The embedded form tells your page when a guest finishes booking, so you can measure conversions in Google Analytics, Meta Pixel or any other tool. No guest personal data is ever shared with your website.

JavaScript
document.addEventListener("dinespot:booked", () => {
  // A reservation was completed - send it to your analytics, e.g.:
  gtag("event", "reservation_completed");
});

document.addEventListener("dinespot:step", (event) => {
  console.log("Booking step", event.detail.step);
});

Using a website builder

The embed code works with every major website builder. Here's where to paste it:

WordPress

Edit the page, add a Custom HTML block and paste the embed code. For a link, use a Buttons block.

Wix

Add → Embed code → Embed HTML. Paste the code and make the element about 900px tall - Wix wraps it in a fixed-size frame. A link button is often the cleaner choice on Wix.

Squarespace

Edit the page, add a Code block and paste the embed code.

Webflow

Drag an Embed element onto the page and paste the embed code.

Shopify

Online Store → Themes → Customize, add a Custom Liquid section and paste the embed code.

Custom-built site

Paste the code in your page template, or hand the AI agent document below to your developer.

Let someone else do it

Hand it off to an AI agent or developer

Using Claude, ChatGPT, Cursor, Lovable or a web developer to manage your site? Give them this document. It contains everything needed to add DineSpot correctly - the code, platform specifics and a checklist to verify the result. Personalise the guide at the top of the page first, and your booking link will be filled in.

Agents that can browse can also read it directly from https://dinespot.si/docs/website-booking-integration.md - just tell them your booking link.

Preview the document
# Task: Add DineSpot table reservations to this website

You are implementing online table reservations on a restaurant's website using **DineSpot**, the restaurant's reservation system. DineSpot hosts the booking form; your job is only to link to it or embed it. Do not build a booking form, call any DineSpot API, or store reservation data - DineSpot handles availability, confirmation emails/SMS and card guarantees.

## Restaurant details

- **Booking hash:** `RESTAURANT_HASH`
- **Hosted booking page:** `https://dinespot.si/book/RESTAURANT_HASH`
- **Preferred language:** `en` (supported: `en`, `si`, `hr`, `de`, `it`, `fr`, `es`, `pt`, `nl`, `pl`, `cz`, `sk`, `hu`, `ro` - `sl` and `cs` are accepted aliases)

If the hash above still reads `RESTAURANT_HASH`, ask the site owner for their booking link. They find it in the DineSpot dashboard under **Settings → Online booking → Your booking page**; the hash is the last part of that URL.

## Choose the approach

Ask the site owner which they want if it isn't clear. Otherwise use **both**: embed the form on a dedicated reservations page (or section), and point every other "Book a table" button at that page.

### Option A - Link to the hosted booking page

Simplest and works on every platform. Add a clearly visible "Book a table" call to action (header/navigation, hero, footer, contact page) that links to:

```
https://dinespot.si/book/RESTAURANT_HASH?lang=en
```

```html
<a href="https://dinespot.si/book/RESTAURANT_HASH?lang=en" target="_blank" rel="noopener">Book a table</a>
```

- Style it as the site's primary button.
- `?lang=` is optional; omit it to let guests pick their language. On multilingual sites, set it to the language of the current page.
- Opening in a new tab is recommended so guests don't lose the restaurant's site.

### Option B - Embed the booking form on the page

Place this where the form should appear (typically a "Reservations" page or a section with `id="reservations"`):

```html
<div data-dinespot="RESTAURANT_HASH" data-lang="en"></div>
<script src="https://dinespot.si/embed.js" async></script>
```

What the script does: it replaces the `div` with an iframe that shows only the booking form card (dark theme, rounded corners, transparent around it), centers it, caps it at 600px wide, and resizes its height automatically as the guest moves through the steps. No styling of the iframe is required.

Optional attributes on the `div`:

| Attribute        | Default        | Purpose                                            |
| ---------------- | -------------- | -------------------------------------------------- |
| `data-lang`      | `si`           | Form language (see list above).                    |
| `data-max-width` | `600px`        | Maximum form width; it always fills its container. |
| `data-title`     | `Book a table` | Accessible title of the iframe.                    |

Rules:

- Load `embed.js` **once per page**, even with several widgets. Load it from `https://dinespot.si/embed.js` - do not copy it into the project.
- In single-page apps (React, Vue, Next.js, Nuxt, Svelte…), render the `div`, load the script once (e.g. in the document head or a root layout), and call `window.DineSpot.mount()` after client-side navigation renders a new widget. Render the widget only on the client.
- Give the container enough horizontal room (ideally ≥ 360px on mobile, full width of the content column). Do not set a fixed height or `overflow: hidden` on the container.
- If the site has a Content-Security-Policy, add `https://dinespot.si` to `script-src` and `frame-src`.

#### Fallback: plain iframe (only if scripts can't be added)

The iframe can't resize itself without the script, so give it a height that fits the longest step:

```html
<iframe
  src="https://dinespot.si/book/RESTAURANT_HASH?embed=1&lang=en"
  title="Book a table"
  allow="payment"
  style="width: 100%; max-width: 600px; height: 900px; border: 0; display: block; margin: 0 auto; color-scheme: dark;"
></iframe>
```

Keep `allow="payment"` (needed for the optional card guarantee step) and `color-scheme: dark` (keeps the area around the card transparent).

### Optional - Track completed bookings

The widget dispatches bubbling DOM events on its container. Wire them to the site's existing analytics only if analytics is already set up:

```js
document.addEventListener("dinespot:booked", () => {
  // e.g. gtag("event", "reservation_completed");
});
document.addEventListener("dinespot:step", (e) => {
  // e.detail.step: 1 = date & time, 2 = guest details, 4 = card guarantee, 3 = done
});
```

No guest personal data is exposed to the website.

## Platform notes

- **WordPress:** add a _Custom HTML_ block with the embed snippet (or a _Buttons_ block with the link for Option A).
- **Webflow:** add an _Embed_ element with the snippet.
- **Squarespace:** add a _Code_ block with the snippet.
- **Wix:** add _Embed HTML (Embed a site / code)_ with the snippet and set the element tall enough (~900px), because Wix wraps it in a fixed-size frame. A link button (Option A) is often the cleaner choice on Wix.
- **Shopify / other builders:** use any "custom HTML / liquid / code" section.

## Acceptance criteria

1. A "Book a table" call to action is visible above the fold on the homepage and in the main navigation (mobile and desktop).
2. If embedded: the form appears on the reservations page/section, fills the content column up to 600px, has no inner scrollbar, and the content below it moves as the form grows.
3. The form loads in the intended language.
4. Nothing on the page breaks layout on a 375px-wide phone.
5. No console errors related to DineSpot (CSP, blocked frames, mixed content).

## Testing

- Open the page, pick a party size, date and time, and confirm the form resizes smoothly.
- **Do not submit a test booking** unless the site owner agrees: every submission creates a real reservation and notifies the restaurant and the guest. If one is made, ask the owner to cancel it in the DineSpot dashboard.

## Support

Questions about DineSpot itself: contact@dinespot.com · https://dinespot.si/lp/docs

Frequently asked questions

Which option should I choose?

If you just want guests to be able to book, start with the link - it takes a minute and works everywhere. Embed the form when you have a reservations page and want guests to book without leaving your site. Many restaurants do both.

Will the booking form match my website?

The form carries your logo and uses a clean dark card with rounded corners. The area around it is transparent, so it sits naturally on light and dark pages.

What language will guests see?

The one you set with ?lang= on the link or data-lang on the embed. Guests can still switch language inside the form. On a multilingual site, use the language of each page.

Can I test it without creating a reservation?

Yes - pick a party size, date and time to see availability. Submitting the form creates a real reservation and sends notifications, so cancel any test booking from your dashboard afterwards.

Does the embedded form work with card guarantees?

Yes. If you require a card guarantee, the card step runs securely inside the embedded form via Stripe.

The form doesn't show up on my site.

Check that the hash is correct and that the script is on the page. If your site uses a Content-Security-Policy, allow https://dinespot.si in script-src and frame-src. Still stuck? Contact us and we'll take a look.

Need a hand?

We're happy to help you get set up - just send us your website address.

Contact us