Embed Parent Window Events
Subscribe to events from embedded Calendly scheduling pages
The embedded scheduling page notifies the parent window of important events during the booking flow. As a developer, you can subscribe to these notifications to fire analytics events or change the state of your app.
We use window.postMessage() to post events to the parent window. Below are the currently supported events and their corresponding message payload.
Supported Events
Profile page viewed
Event type viewed
Date and time selected
Event scheduled
Page height changed
Listening for Events
This example code listens to these events and logs them to the console:
Use Cases
- Analytics tracking: Fire analytics events when users view event types or complete bookings
- State management: Update your app state when bookings are completed
- Dynamic sizing: Adjust your embed container height based on the
page_heightevent - Confirmation pages: Redirect users or show confirmation UI after
event_scheduled