Schedulingcal.com
Can you embed Cal.com in an iframe?
Yes, with the HTML snippet from the Embed Snippet Generator. The snippet loads your booking link inline on your page.
Checked Test again
Live check
Two links, two results
Booking pageEmbeddable
cal.com/rick/get-rick-rolled- X-Frame-Options
- Not sent
- CSP frame-ancestors
- Not sent
- Response
- 200 OK · 235 ms · HTTPS
Booking linkEmbeddable
cal.com/rick/get-rick-rolled- X-Frame-Options
- Not sent
- CSP frame-ancestors
- Not sent
- Response
- 200 OK · 235 ms · HTTPS
Steps
How to embed Cal.com
- Open your event types in Cal.com.
- Click the three dots of the event type. Then clickEmbed
- Select the inline embed type.
- Set the size, theme, brand color, layout, and event type details.
- Copy the HTML code snippet. Paste it into your page.
Embed code
Paste this into your page
HTML
<div id="my-cal-inline" style="width: 100%; height: 100%; overflow: scroll"></div>
<script type="text/javascript">
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if (typeof namespace === "string") { cal.ns[namespace] = cal.ns[namespace] || api; p(cal.ns[namespace], ar); p(cal, ["initNamespace", namespace]); } else p(cal, ar); return; } p(cal, ar); }; })(window, "https://app.cal.com/embed/embed.js", "init");
Cal("init", { origin: "https://cal.com" });
Cal("inline", {
elementOrSelector: "#my-cal-inline",
calLink: "{username}/{event-slug}",
});
</script>Set calLink to the path of your link, not the full URL. Self-hosted Cal.com gives a snippet for its own origin.
URL patterns
Swap the link you have for the embed URL
- You havecal.com/{username}/{event-slug}Use in the iframecalLink: "{username}/{event-slug}"
- You havecal.com/{username}Use in the iframecalLink: "{username}"
You can embed an event type or your profile page. Cal.com documents routing forms as a separate snippet.
Good to know
- The embed types are inline, pop-up on element click, and floating button pop-up.
- Cal("ui", { hideEventTypeDetails: true }) hides the title, duration, and description card.
- The generator gives an HTML snippet and a React snippet.
- To track UTM parameters, read them from your page and pass them in the embed config.
Sources
- Cal.com Help · Adding embed to your webpagecal.com/help/embedding/adding-embed
- Cal.com Help · Getting Embed Code Snippetscal.com/help/embedding/embed-snippet-generator
- Cal.com Help · Embed instructionscal.com/help/embedding/embed-instructions
- Cal.com Help · UTM Parameter Tracking in Embedscal.com/help/embedding/utm-tracking-embed
- Cal.com GitHub · embed-snippet sourcegithub.com/calcom/cal.com/blob/main/packages/embeds/embed-snippet/src/index.ts
- iframecheck live check · both links
Profile updated