# Squarespace (/developers/platforms/squarespace)



You can take bookings on a Squarespace site without sending customers away from it. This guide covers Book Now buttons that open booking on top of your page, and booking placed directly on a page.

<IntegrateNow host="squarespace" />

The wizard writes the code below with your own Location ID and booking page address already in it. If you would rather do it by hand, read on.

Before you start [#before-you-start]

* **A Core, Plus or Advanced plan.** Squarespace does not run custom code on the Basic plan.
* **Your Location ID.** In the Resytech dashboard, click your name in the top right and choose **Location Settings**. The ID is at the top of the page with a copy button.
* **Your booking page address.** In the dashboard, click your name in the top right, choose **Location Settings**, then open **Booking Domain**. The address has to show **Verified**. See [Booking Page Address](/docs/getting-started/booking-page-address).

<Callout type="warn" title="Test in a private window">
  Squarespace switches custom code off while you are logged in and editing. Nothing on this page will appear to work in the editor or in preview. Open your site in a private or incognito window to test.
</Callout>

Book Now buttons [#book-now-buttons]

<Steps>
  <Step>
    Add the booking script to your site [#add-the-booking-script-to-your-site]

    In Squarespace, open **Website Tools**, then **Code Injection**. On older menus it is under **Settings**, **Advanced**, **Code Injection**.

    Paste this into the **Header** field, replacing `YOUR_LOCATION_ID` and the booking page address with your own. If there is already code in that field, add this underneath it. Then click **Save**.

    ```html
    <script
      src="https://js.resytech.com/1/resytech.js"
      data-resytech-location-id="YOUR_LOCATION_ID"
      data-resytech-base-url="https://yourbusiness.bookingui.com"
      data-resytech-links="true"></script>
    ```

    This loads Resytech booking. The last line lets ordinary Squarespace buttons and links open it, because Squarespace buttons can only be given a link.
  </Step>

  <Step>
    Point a button at a booking link [#point-a-button-at-a-booking-link]

    Add a **Button** block, or edit a button or navigation link you already have. Header buttons and menu links work too. In the link field, type one of these exactly as shown, starting with the slash:

    | Link                      | What it opens                                                                                    |
    | ------------------------- | ------------------------------------------------------------------------------------------------ |
    | `/#book`                  | The full booking flow, where customers choose an activity first                                  |
    | `/#book-YOUR_ACTIVITY_ID` | One activity. The ID is the last part of the address when you open the activity in the dashboard |
    | `/#gift-card`             | Gift card purchase                                                                               |

    Save the page. You can use a different link on each button.
  </Step>

  <Step>
    Test it [#test-it]

    Open your site in a private or incognito window and click the button. The booking window should open on top of the page.
  </Step>
</Steps>

Slide-in panel instead of a pop-up [#slide-in-panel-instead-of-a-pop-up]

To have booking slide in from the side of the page, add one line to the script tag:

```html
<script
  src="https://js.resytech.com/1/resytech.js"
  data-resytech-location-id="YOUR_LOCATION_ID"
  data-resytech-base-url="https://yourbusiness.bookingui.com"
  data-resytech-presentation="drawer"
  data-resytech-links="true"></script>
```

Booking on a page [#booking-on-a-page]

This places the booking calendar inside one of your pages, with no button to click.

<Steps>
  <Step>
    Add the booking script to your site [#add-the-booking-script-to-your-site-1]

    Open **Website Tools**, then **Code Injection**, and paste this into the **Header** field. If you already added the script tag for Book Now buttons, keep it and add only the last line underneath.

    ```html
    <script
      src="https://js.resytech.com/1/resytech.js"
      data-resytech-location-id="YOUR_LOCATION_ID"
      data-resytech-base-url="https://yourbusiness.bookingui.com"
      data-resytech-links="true"></script>
    <script>new ResytechApi().registerComponents();</script>
    ```
  </Step>

  <Step>
    Place the booking on a page [#place-the-booking-on-a-page]

    Open the page in the editor and click **Edit*&#x2A;. Click an insert point (the &#x2A;*+**) where the booking should appear and choose **Code**. Check the block is set to **HTML** and that **Display Source** is switched off, then paste this in and save the page.

    ```html
    <resytech-booking-embed
      base-url="https://yourbusiness.bookingui.com"
      location-id="YOUR_LOCATION_ID">
    </resytech-booking-embed>
    ```

    To show one activity, add `activity-id="YOUR_ACTIVITY_ID"` to the tag. The booking area is 700 pixels tall unless you say otherwise. Add `height="900"` to change it.
  </Step>

  <Step>
    Test it [#test-it-1]

    Open the page in a private or incognito window. The booking calendar should appear where you placed the block.
  </Step>
</Steps>

A link to your booking page [#a-link-to-your-booking-page]

If you would rather not add any code, point a button at your booking page address, for example `https://yourbusiness.bookingui.com`. Add `/YOUR_ACTIVITY_ID` to go straight to one activity, or `/gift-cards` for gift cards. Customers book on your booking page instead of on your site. This works on every Squarespace plan.

Troubleshooting [#troubleshooting]

<Accordions type="single">
  <Accordion title="Nothing happens when I click the button">
    Check you are testing in a private window, not the Squarespace editor or preview. Then check the code is saved in the Header field of Code Injection, and that the button link is typed exactly as shown.
  </Accordion>

  <Accordion title="Code Injection is missing or locked">
    Code Injection and scripts in Code Blocks need a Core, Plus or Advanced plan. They are not available on Basic.
  </Accordion>

  <Accordion title="The booking window opens but stays blank or shows an error">
    The booking page address in the code has to match your address in the dashboard exactly, including `https://`. In the dashboard, click your name in the top right, choose **Location Settings**, open **Booking Domain** and check the address shows **Verified**.
  </Accordion>

  <Accordion title="The code shows up as text on my page">
    The Code Block has Display Source switched on, or it is not set to HTML. Edit the block, choose HTML and switch Display Source off.
  </Accordion>

  <Accordion title="It works on the first page but not after clicking around (version 7.0)">
    Some 7.0 templates load pages without a full refresh, which can stop code from running. Turn off Ajax loading in Site Styles, or reload the page to confirm that is the cause. Version 7.1 sites do not have this setting.
  </Accordion>

  <Accordion title="I need to see what the script is doing">
    Add `data-resytech-debug="true"` to the script tag, reload the page and open the browser console. Remove it again once things work.
  </Accordion>

  <Accordion title="Squarespace support will not help">
    Squarespace does not support custom code. If you get stuck, contact Resytech support and tell us the page you are working on.
  </Accordion>
</Accordions>

Related [#related]

* [Add Booking to Your Website](/developers/integrate): the wizard that writes this code for you
* [Installation](/developers/installation): everything the script tag can do
* [Embed Booking UI](/developers/embed-booking-ui): more options for booking on a page
