Iframe – embed on your website
How to run your own code on the parent page when a booking completes in an embedded Meety flow.
When you embed Meety with an iframe on your site, the page that wraps the iframe can react to a successful booking. After the booking is confirmed, Meety sends the parent window a message via window.parent.postMessage. The event field is the string meety.booking_success; the body of the message is in the payload object described below.
The message is sent only when the customer sees the confirmation inside the embedded view (window.parent !== window). Meety calls postMessage with target *. Always verify event.origin against the domain where Meety is hosted before handling the data.
Message body
{
// Use this to ignore unrelated postMessage traffic.
"event": "meety.booking_success",
"payload": {
// Booking id. Matches GTM transaction_id and Meta eventID where Meety sends them.
"appointmentId": "clx7y8z9example0001bookingid",
// Internal facility id in Meety.
"facilityId": "cm3examplefacilityid0001",
// Public slug from the booking URL (/book/your-slug).
"facilitySlug": "your-business",
// Appointment start (ISO 8601 from the server response).
"startTime": "2026-03-28T14:00:00.000Z",
// Facility currency (ISO 4217).
"currency": "EUR",
// Total amount; same basis as conversion value inside the iframe.
"value": 45,
// Service ids included in the booking.
"serviceIds": ["srv_abc123", "srv_def456"]
}
}
Handling the event on your page
window.addEventListener("message", (event) => {
if (event.data?.event !== "meety.booking_success") return;
// if (event.origin !== "https://meety.sk") return;
const {
appointmentId,
value,
currency,
facilitySlug,
startTime,
serviceIds,
} = event.data.payload;
// Example: Meta Pixel on the parent site
// window.fbq?.("track", "Purchase", { value, currency }, { eventID: appointmentId });
});
Meta Pixel in Meety
If you have Meta Pixel enabled in Meety booking settings, it loads inside the iframe. If you also run your own Meta Pixel or GTM on the parent page and listen for meety.booking_success, use the same appointmentId as GTM transaction_id and Meta eventID so the same booking is not counted twice.
