> For the complete documentation index, see [llms.txt](https://docs.dapta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dapta.ai/dcal/share/embed.md).

# Embed on your website

Put your dCal booking page inside your own website. Copy the snippet from the Embed on your site dialog, paste it into WordPress, Webflow or plain HTML, let the frame size itself, change the accent, t

Instead of sending visitors to a dCal link, you can show your booking page inside one of your own pages. Guests pick a time and book without leaving your site, and the booking lands in your dashboard and your calendar like any other.

***

## Get the snippet

**Step 1:** Find the **Embed on your site** button (the code icon) for what you want to embed:

| To embed                                | Where the button is                                                     |
| --------------------------------------- | ----------------------------------------------------------------------- |
| One event                               | **Events**, on the event's row, or at the top of the event's edit page. |
| Your profile page, with all your events | **Settings** > **Booking Page**, under **Profile**.                     |
| A team event                            | **Teams**, open the team, on the event's row.                           |

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-05482926c7b74079243126bc9bcd0b507e12ae68%2Fdcal-embed-01-embed-button.png?alt=media" alt="The Intro call row on the Events page with the Embed on your site icon boxed, next to Copy link"><figcaption><p>Each event has its own embed. The button sits next to <strong>Copy link</strong>.</p></figcaption></figure>

***

**Step 2:** The **Embed on your site** dialog opens. Under **Accent color**, keep **Use my booking page style** to match your booking page, or choose **Pick a color for this embed** and pick a color for this embed only.

<figure><img src="https://3835013762-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCy5rSNtQmtqYCGzJlNEB%2Fuploads%2Fgit-blob-9de987adeeb36b9f1853b396966c3ee9c9293b5a%2Fdcal-embed-02-dialog.png?alt=media" alt="The Embed on your site dialog with its intro text and the boxed Accent color options, Use my booking page style (selected) and Pick a color for this embed with a color swatch"><figcaption><p>The accent is the only option in the dialog. Everything else follows your booking page.</p></figcaption></figure>

***

**Step 3:** Click **Copy code**. The button turns into **Copied**. Click **Done** to close the dialog.

The snippet has two parts: an `iframe` that shows your booking page, and a small script, `embed.js`, that sizes the frame. It looks like this, with your own address in it:

```html
<iframe data-dapta-calendars src="https://book.dcal.ai/k7m2xq/jdoe/intro-call?embed=1"
        title="Intro call" loading="lazy"
        style="width:100%;border:0;min-height:700px;"></iframe>
<script src="https://book.dcal.ai/embed.js" async></script>
```

| Part                   | Why it is there                                                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `?embed=1`             | Tells the page it runs inside your site, so it drops the outer spacing and reports its height. Without it, the URL parameters below are ignored. |
| `data-dapta-calendars` | The mark the script looks for. Keep it: without it, the frame does not resize.                                                                   |
| `title`                | The event or your name, read out by screen readers. Change it if you want other wording.                                                         |
| `width:100%`           | The booking page takes the width of whatever holds it, so it stays responsive.                                                                   |
| `min-height:700px`     | The height the frame starts at, before the script measures the page.                                                                             |
| `embed.js`             | Resizes the frame to fit the page. One copy handles every embed on your page.                                                                    |

With a custom accent, the address ends with the color too, for example `?embed=1&amp;brand_color=%231a73e8`. The `&amp;` is how `&` is written inside HTML, and `%23` stands for `#`.

> **💡 Tip:** Snippets copied before booking pages moved to `book.dcal.ai` have `app.dcal.ai` in them. They keep working as they are: the frame is never sent to another address. Copy the snippet again when you can, so your embed gets everything on this page, including the tags in [Tracking and pixels](https://docs.dapta.ai/dcal/events/event-settings.md#tracking-and-pixels).

***

**Step 4:** Paste the snippet into your page, where the booking page should appear.

* **WordPress:** edit the page, add a **Custom HTML** block and paste the snippet into it.
* **Webflow:** add an **Embed** element, paste the snippet into the code editor and publish the site.
* **Plain HTML, or any other site builder:** paste it into the body of the page, inside the container that should hold the booking page.

***

**Step 5:** Open your page and check it. The booking page should sit inside your layout with no scroll bar of its own. Book a test meeting to see the whole flow.

***

## The height takes care of itself

The booking page changes height as the guest moves from the calendar to the form and the confirmation. Each time, it reports its new height and `embed.js` resizes the frame, so your page grows and shrinks with it. Once the first height arrives, the frame can also get shorter than 700 pixels, so a short page does not leave empty space.

* Several embeds on one page each size themselves. Keep a single `embed.js` line.
* If the script is blocked, the booking page still loads and still takes bookings. The frame just keeps the height in `min-height`.

***

## Change the look of one embed

An embed looks like your booking page. To change it for one embed only, add parameters to the address in `src`, after `?embed=1`, each one with `&` in front. They mirror the settings of [Colors, fonts and presets](https://docs.dapta.ai/dcal/design/look-and-presets.md).

| Parameter     | Values                                                                            | Same as this setting |
| ------------- | --------------------------------------------------------------------------------- | -------------------- |
| `brand_color` | Six hex digits, for example `1a73e8` (or `%231a73e8`, where `%23` stands for `#`) | **Accent**           |
| `theme`       | `light`, `dark`                                                                   | **Theme**            |
| `template`    | `classic`, `split`, `banded`                                                      | **Template**         |
| `card_style`  | `outline`, `elevated`, `filled`                                                   | **Card style**       |
| `corners`     | `sharp`, `soft`, `round`                                                          | **Corners**          |
| `buttons`     | `rounded`, `pill`, `square`                                                       | **Buttons**          |
| `density`     | `comfortable`, `compact`                                                          | **Density**          |
| `font`        | `sans`, `rounded`, `serif`                                                        | **Font**             |
| `slot_layout` | `grid`, `list`                                                                    | **Slot layout**      |
| `day_group`   | `flat`, `boxed`                                                                   | **Day group**        |
| `slot_select` | `soft`, `solid`                                                                   | **Slot select**      |

For example, a dark embed with the times as a list:

```html
<iframe data-dapta-calendars src="https://book.dcal.ai/k7m2xq/jdoe/intro-call?embed=1&amp;theme=dark&amp;slot_layout=list"
        title="Intro call" loading="lazy"
        style="width:100%;border:0;min-height:700px;"></iframe>
<script src="https://book.dcal.ai/embed.js" async></script>
```

* A value dCal does not recognize is ignored. The other parameters still apply.
* Parameters only change how the page looks. Your booking page settings stay as they are, and your shared links are not affected.
* The dialog lists every parameter except `theme`, which works the same way.

***

## Which pages you can embed

| Page                  | Address in `src`                                                    |
| --------------------- | ------------------------------------------------------------------- |
| Your profile page     | `book.dcal.ai/{account code}/{handle}?embed=1`                      |
| One event             | `book.dcal.ai/{account code}/{handle}/{event slug}?embed=1`         |
| A team page           | `book.dcal.ai/{account code}/team/{team slug}?embed=1`              |
| A team event          | `book.dcal.ai/{account code}/team/{team slug}/{event slug}?embed=1` |
| A one-off invite link | `book.dcal.ai/booking/{code}?embed=1`                               |

The dialog gives you snippets for your profile page, your events and team events. For a team page, copy any snippet and replace the address in `src` with the team page's link, keeping `?embed=1`.

> **⚠️ Note:** Embed only events that are visible. A hidden event's address does not open, inside an embed or anywhere else. See [Your links and profile page](https://docs.dapta.ai/dcal/share/your-booking-page.md#your-profile-page).

The dCal dashboard and your guests' **Manage your booking** page cannot be shown inside another site.

***

## After a guest books

* The confirmation shows inside your page. **Manage your booking** opens in a new tab.
* If the event has a [Redirect after booking](https://docs.dapta.ai/dcal/events/event-settings.md#redirect-after-booking), your whole page goes to that address, not just the frame. If the browser blocks it, the confirmation stays in the frame with a **Continue** link.
* If the event has [Tracking and pixels](https://docs.dapta.ai/dcal/events/event-settings.md#tracking-and-pixels), the tags run inside the frame, on the embedded booking page, not on your page. Google Tag Manager, Google Analytics 4 and HubSpot run only in frames on `book.dcal.ai`, so an older snippet with `app.dcal.ai` gets Meta Pixel and PostHog only. Google Analytics 4 counts the visits and bookings in the frame in browsers that accept partitioned cookies, such as Chrome.
* The booking keeps the UTM tags of your page's address, as long as `embed.js` is on your page. See [Track where bookings come from](https://docs.dapta.ai/dcal/share/your-booking-page.md#track-where-bookings-come-from).

***

## Messages your page receives

The embedded booking page tells your page what the guest does, so you can count each step in your own analytics. Each message has an `event` and a `payload`:

| `event`                             | When                                                         | `payload`                                                       |
| ----------------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------- |
| `dapta-calendars.event_type_viewed` | An event's booking page opens in the frame                   | `eventTypeSlug`: the end of the event's address                 |
| `dapta-calendars.date_selected`     | The guest picks a day                                        | `eventTypeSlug` and `date`, the day as `YYYY-MM-DD`             |
| `dapta-calendars.time_selected`     | The guest picks a time                                       | `eventTypeSlug` and `startUtc`, the start in UTC                |
| `dapta-calendars.booking_scheduled` | The guest books, requests you still have to confirm included | `uid` (the booking's reference), `startUtc` and `eventTypeSlug` |

Any page that embeds a booking page can receive these messages, so they never include the guest's name, email or answers.

Check where a message comes from before you use it. A snippet copied from **Embed on your site** today sends its messages from `https://book.dcal.ai`; an older snippet sends them from `https://app.dcal.ai`. Accept the one your snippet uses, or both. For example, to send bookings to your analytics:

```html
<script>
  window.addEventListener('message', function (e) {
    if (e.origin !== 'https://book.dcal.ai' && e.origin !== 'https://app.dcal.ai') return;
    if (e.data && e.data.event === 'dapta-calendars.booking_scheduled') {
      console.log('Booked', e.data.payload.eventTypeSlug, e.data.payload.startUtc);
    }
  });
</script>
```

***

## Good to know

* The embed is inline: it sits in your page where you paste it. There is no pop-up or floating button version.
* The **Made with dCal.ai by Dapta** badge shows inside the embed, unless your workspace hides the Dapta branding. See [The Dapta badge](https://docs.dapta.ai/dcal/design/dapta-branding.md).
* Embedded addresses are not shown by search engines, so they never compete with your own page.
* Snippets keep working if your workspace later gets a [custom link](https://docs.dapta.ai/dcal/share/custom-link.md): the old address sends the frame to the new one and keeps your parameters.
* If you change your handle or the end of an event's address, update the `src` of your snippets: the old address stops opening.
* To fix the language of an embed, add `&amp;lang=es` or `&amp;lang=en` to the `src`. It works on every page you can embed.
* There are no parameters to fill in the guest's name or email in advance.
* If your site only allows frames and scripts from addresses it lists, add `https://book.dcal.ai` to that list before you paste a new snippet.

## Related

* [Your links and profile page](https://docs.dapta.ai/dcal/share/your-booking-page.md)
* [Colors, fonts and presets](https://docs.dapta.ai/dcal/design/look-and-presets.md)
* [Custom link](https://docs.dapta.ai/dcal/share/custom-link.md)
* [What your guests see](https://docs.dapta.ai/dcal/what-guests-see.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dapta.ai/dcal/share/embed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
