/embed.js and /embed-guide.html; no new backend or database deployment is needed for embedding.Example (replace the entire booking URL and script origin with the code from Settings):
<div data-orar-url="https://YOUR-ORAR-DOMAIN/book/TENANT/SLUG">
<a href="https://YOUR-ORAR-DOMAIN/book/TENANT/SLUG" target="_blank" rel="noopener">Open booking page</a>
</div>
<script src="https://YOUR-ORAR-DOMAIN/embed.js" defer></script>
Use the deployed HTTPS Orar address on a live website. Localhost addresses only work on the developer's computer. Orar and the business website can have different domains. The website owner does not need API keys, Firebase configuration, or an Orar login for visitors.
The script creates a titled iframe and resizes it as the form changes, including shrinking after confirmation. Each widget is independent. Load the script once when possible; repeat inclusion does not create duplicate frames. Keep the fallback link for browsers, extensions, or website builders that block the widget. The host container must have a usable width; avoid setting a fixed height or overflow:hidden on it.
The layout preview in Settings is a live form in a fixed-height preview frame. Automatic resizing happens on the installed host page.
Register this listener on the host website before visitors can submit a booking:
<script>
document.addEventListener('orar:booking-success', function (event) {
const { bookingId, status } = event.detail;
// Connect to your own analytics only when permitted by your consent settings.
// Do not count both pending and later approval as two new bookings.
console.log('Orar booking submitted:', bookingId, status);
});
</script>
The event bubbles from the div[data-orar-url] containing the widget. For multiple widgets, attach the listener to a specific container or inspect event.target.
| Field | Meaning |
|---|---|
bookingId |
Opaque appointment reference, useful for deduplicating conversions |
status: "confirmed" |
The appointment was confirmed immediately |
status: "pending" |
The request was accepted but still needs staff approval |
An event is emitted after successful server confirmation, not when a visitor clicks a button, holds a time, encounters an error, or opens the page. Repeated success messages for the same booking are deduplicated within each widget's lifetime. Your analytics should also deduplicate by booking reference if needed. No name, email, phone, answers, payment data, or reservation token is included. A booking reference is still an identifier; apply your own retention and consent policies.
For Google Tag Manager, a site developer can adapt this example inside the site's consent-approved analytics setup:
document.addEventListener('orar:booking-success', function (event) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: event.detail.status === 'confirmed' ? 'orar_booking_confirmed' : 'orar_booking_requested',
orar_booking_id: event.detail.bookingId,
orar_booking_status: event.detail.status
});
});
This only publishes a data-layer event. Configure the corresponding analytics/ad conversion tag and consent checks yourself. Orar does not install ad pixels, read campaign cookies, collect UTMs, or guarantee delivery to analytics. Staff approvals after the visitor leaves do not generate browser events. This client-side signal is for UI/analytics, not a trusted payment or fulfillment webhook.
window.Orar.mount() after insertion. Do not remove/recreate the widget on every render: that resets the booking flow.For script-restricted sites, link to the booking page or use a plain iframe with a manual height. A plain iframe does not provide the host-side resizing or custom events described above.
/embed.js.script-src and frame-src. Hosts with strict policies may need a nonce for their own analytics listener. An Orar hosting/proxy policy must allow the business website to frame the public booking route; X-Frame-Options: SAMEORIGIN or restrictive frame-ancestors will block cross-domain embeds.file:// previews or opaque sandbox origins. Keep booking available without third-party cookies.Included: inline embedding, copyable installation code and layout preview, automatic height updates, fallback link, and successful-booking events. Not included: popup widgets, campaign attribution, custom styling controls, per-business allowed domains, ad-platform configuration, or server webhooks.