GTM template: track Calendly bookings as GA4 events
Calendly sends GA4 nothing. A postMessage listener fixes that, plus the one condition that stops widget views counting as bookings.
2 tags
in the container
Originally written in German — read it on visnakovs.de.
Calendly runs as an embed or a pop-up and sends no standard events to GA4 — so the bookings show up nowhere in your reports. This GTM template closes the gap and makes every Calendly booking measurable as a GA4 event.
What’s in the template
- 1 custom HTML tag — Calendly event listener that watches for
messageevents from the Calendly embed - 1 GA4 event tag — fires on Calendly events (booking started, booking completed)
- 1 custom event trigger — the
calendlyevent - 1 DataLayer variable —
calendly_event, carrying the event type
How it works
Calendly talks to the parent page over the postMessage API. The custom HTML tag listens for those messages and pushes them into the DataLayer:
window.addEventListener('message', function(e) {
if (e.data.event && e.data.event.indexOf('calendly') > -1) {
dataLayer.push({
event: 'calendly',
calendly_event: e.data.event
});
}
});
The GA4 event tag fires on the calendly custom event and passes the event type through as a parameter.
The Calendly events you can track
calendly.profile_page_viewed— the Calendly widget loadedcalendly.event_type_viewed— the user looked at an appointment typecalendly.date_and_time_selected— date and time pickedcalendly.event_scheduled— the appointment was booked — that’s your conversion
Setup in two minutes
1. Import the template
Import container → upload the JSON → merge.
2. Enter your GA4 measurement ID
Drop your G-XXXXXXX ID into the GA4 event tag.
3. Test it
- Turn on GTM preview mode
- Open the Calendly widget
- Book a test appointment
- Check: does the tag fire on
calendly.event_scheduled?
Count only real bookings as conversions
Add a condition to the GA4 event tag so it only fires on calendly.event_scheduled. Then the actual booking counts as a conversion — not every widget view. Skip this and your conversion column quietly inflates with people who opened the calendar and left.
Download the template
The configurator that generates this container lives on my German site: the GTM configurator (in German) bundles all seven of my setups in one tool. The interface is German, the JSON it produces is language-neutral.
Grab the container file below and import it into your Google Tag Manager container under Admin → Import Container. No sign-up, no email wall — it’s a plain file.
No email, no form — just take it.
Downloadgtm-template-calendly-tracking.jsonGTM container, ~6 KB — import it straight into your containerIf your booking tracking is guessing rather than measuring — or you want a second pair of eyes on the setup before you trust the numbers — write to me.