You can track Calendly bookings using Fathom by listening for events fired by the Calendly embed. With a small snippet of JavaScript, you’ll be able to track when someone selects a date/time or completes a booking.
You can also combine both event types into a single script:
Copy
Ask AI
<script> function isCalendlyEvent(e) { return e.data.event && e.data.event.indexOf('calendly') === 0; }; window.addEventListener('message', function(e) { if (isCalendlyEvent(e)) { if (e.data.event === 'calendly.date_and_time_selected') { fathom.trackEvent('Calendly Date/Time Selected'); } if (e.data.event === 'calendly.event_scheduled') { fathom.trackEvent('Calendly Booking Completed'); } } });</script>
Note: Feel free to update the event names (Calendly Date/Time Selected and Calendly Booking Completed) to whatever works best for you. These names will appear in your Fathom dashboard exactly as written, so it’s worth using labels that make sense to you.
We recommend adding the code snippet to the footer of your site, just before the closing tag. This ensures the Fathom script loads and page content loads first, and avoids blocking anything critical. Make sure it’s added on every page where your Calendly embed appears, otherwise the events won’t be picked up.