Track Calendly Bookings in Google Tag Manager with this Free GTM Recipe
A free, tested Google Tag Manager recipe that captures Calendly bookings and turns them into a trigger you can use to fire conversions to Google Ads, Google Analytics and more.


Google Tag Manager is one of the more common ways to setup conversion tracking in Google Ads, Google Analytics, etc when someone books a meeting through Calendly on your website.
The problem is, it's quite difficult to do. Calendly loads inside an embedded widget (an iframe), which means Google Tag Manager's built-in triggers can't see when someone books a meeting, so you're left having to write custom code that listens for Calendly's messages and sends an event to the dataLayer, and then you need to build all the Triggers, Tags and Variables on top of that.
And unless you're a developer or very experienced with Google Tag Manager, you're going to struggle.
Fortunately though, there is a simple solution.
You can simply install this Calendly Conversion Tracking Recipe in your Google Tag Manager account and you'll have everything you need to get basic conversion tracking set up.
What Is a Google Tag Manager Recipe and What's in It?
A recipe is a pre-built bundle of Google Tag Manager assets (a Tag, a Trigger and two Variables) that you import in one go instead of building each piece yourself.
This recipe detects meetings booked through Calendly, sends a 'Meeting Booked' event to Google Tag Manager, and gives you a Trigger you can use to send conversions to Google Analytics, Google Ads, etc.
There are four parts to it, and here's exactly what's in each part:
Custom HTML Tag
Listens for completed Calendly bookings and pushes a 'calendly_event_scheduled' event to the dataLayer. It fires on All Pages, once per event, and this is the code inside it:
(function () {
if (window.__converlyRecipeCalendly) return;
window.__converlyRecipeCalendly = true;
window.dataLayer = window.dataLayer || [];
// Calendly posts from https://calendly.com exactly (no per-account
// subdomains for the embed iframe). Pattern also allows for any future
// subdomain Calendly might introduce.
var ORIGIN_PATTERN = /(^|\.)calendly\.com$/;
function fireConversion(eventUri, inviteeUri) {
window.dataLayer.push({
event: 'calendly_event_scheduled',
event_uri: eventUri || '',
invitee_uri: inviteeUri || ''
});
}
function looksLikeCalendlyScheduled(data) {
if (!data || typeof data !== 'object') return false;
return data.event === 'calendly.event_scheduled';
}
function onMessage(event) {
if (!event || !event.source) return;
if (event.source === window) return;
if (!event.origin || typeof event.origin !== 'string') return;
// Origin check — HTTPS-only, host-anchored. event.origin is like
// "https://calendly.com" — extract just the host and test it. The
// strict https:// prefix rejects http:// origins; the $-anchored host
// pattern rejects look-alikes (calendly.com.evil.com).
var hostMatch = /^https:\/\/([^/]+)$/.exec(event.origin);
if (!hostMatch) return;
if (!ORIGIN_PATTERN.test(hostMatch[1])) return;
var data = event.data;
// Calendly always sends object payloads, but be defensive against
// string-encoded variants the SDK might introduce.
if (typeof data === 'string') {
try { data = JSON.parse(data); } catch (e) { return; }
}
if (!looksLikeCalendlyScheduled(data)) return;
var payload = data.payload || {};
var inviteeUri = payload.invitee && payload.invitee.uri;
var eventUri = payload.event && payload.event.uri;
if (!inviteeUri || !eventUri) return;
fireConversion(eventUri, inviteeUri);
}
window.addEventListener('message', onMessage, false);
})();Variables
Capture reference IDs for the event type and the booking, ready to use as a filter in any of your tags. These are their exact settings:
Name
DLV - Calendly Event URI
Variable Type
Data Layer Variable
Data Layer Variable Name
event_uri
Name
DLV - Calendly Invitee URI
Variable Type
Data Layer Variable
Data Layer Variable Name
invitee_uri
Trigger
Fires when the 'calendly_event_scheduled' event is received and can be used as the trigger for any of your conversion tags. These are its exact settings:
Name
CE - Calendly Event Scheduled
Trigger Type
Custom Event
Event Name
calendly_event_scheduled
Download This Recipe
Get the ready-to-import file and upload it into Google Tag Manager. Everything shown above (the tag, the trigger and both variables) comes pre-built inside.
Built from Converly's own Calendly detection code
Why It's the Best Recipe Out There
It is built from the same detection code we use in our own conversion tracking product, Converly, just adapted to run inside Google Tag Manager.
How to Use the Calendly GTM Recipe
Install the Recipe
Download the recipe using the form above, then import it into your Google Tag Manager container. In GTM, head to Admin, choose Import Container, select the downloaded file, and pick the Merge option so it doesn't overwrite anything already in your container. The listener, variables and trigger are added for you automatically.

Configure Your Tags
Now that the recipe is installed, you can use it as a Trigger for your conversion tags. Here are two common examples.
Example 1: Google Analytics
Create a GA4 event tag and set the Trigger the recipe provides (called CE - Calendly Event Scheduled) as its firing trigger. Every Calendly booking now sends an event to Google Analytics.

Example 2: Google Ads
Add your Google Ads conversion tag and set it to fire it on the recipe's trigger (called CE - Calendly Event Scheduled). This will send conversions to Google Ads when a meeting is booked through the Calendly widget on your site.

What This Enables You to Do (and What It Doesn't)
This recipe fires an event in Google Tag Manager whenever a Calendly booking is completed. You can use that as a trigger to send conversions to Google Ads, Google Analytics and other tags.
What it does
Sends an Event to GTM
Detects completed Calendly bookings and pushes an event called 'calendly_event_scheduled' into your dataLayer automatically.
Tells You Which Event Type Was Booked
Captures reference IDs for the event type and the booking, which you can use as filters to fire different tags for different meeting types.
Creates a Trigger in GTM
Gives you a 'Trigger' in Google Tag Manager which you can use as the trigger for any of your conversion tags.
What it doesn't do
Doesn't send the conversion server-side
Everything happens in the visitor's browser, so if they have ad blockers installed or are using a privacy-centric browser (like Safari) then the events can be blocked from reaching Google Analytics or Google Ads. Expect to lose 30% of your conversions.
No Click IDs or Identifiers
It does not capture the Google click ID, Facebook click ID, Meta pixel cookies, IP address or user agent, which ad platforms need for Enhanced Conversions (Google) or a proper Event Match Quality score (Meta).
No Personal Details
The script only fires an event. It does not capture the lead's name, email or phone number, all of which Google and Meta require for Enhanced Conversions and a high match score.
No Logging or Notifications
You can test it with Tag Assistant when you first set it up, but unless you check every week, you have no way of knowing if it breaks.
The Proper Way to Send Conversions to Google Ads, Meta Ads & More
This recipe is fine if you only send events to Google Analytics, which does not accept personal information or IP addresses. But to get a good Event Match Quality (EMQ) score in Meta, or use Enhanced Conversions in Google, you need to send the data server-side, together with the lead's name and email. That is what Converly does.

Here's why Converly is the best way to send conversions to Google Ads, Meta Ads, Microsoft Ads, LinkedIn Ads, etc.
Easy to set up
Converly gives you a simple drag-and-drop builder you can use to build a Conversion Flow. Simply select a trigger (like a meeting being booked through Calendly) and then select your actions (like sending a conversion to Google Ads). No custom code, no complex configuration. If you use an AI tool like Claude or ChatGPT, you can connect it to Converly and then just say 'Setup conversion tracking in Calendly' and everything will be done for you!
Works with Any Calendly Embed
The free recipe only works if you use Calendly's JavaScript embed to place the booking widget on your site. Converly can tracking books any way you use Calendly, including if it's embedded or if you simply link out to your Calendly booking page from your website.
Sends Data Server-Side
Converly sends conversions directly from its servers to Google, Meta, etc. This means ad blockers and privacy restrictions can't stop the conversion being delivered. Expect to get 30% more recorded conversions with Converly.
Sends More Data
It captures the lead's name, email and phone plus the Google and Facebook click IDs, IP address and user agent, and sends them with every conversion. That enables Enhanced Conversions in Google Ads, or gives you an Event Match Quality (EMQ) score of 9 or 10 in Meta.
Full Conversion Log & Email Notifications
See every conversion, what was captured, what was sent to each platform and whether it was received. Get email alerts so tracking can't break without you knowing.
Supports Multiple Tools & Destinations
Detects submissions across 100+ form, scheduling and chat tools and sends to 20+ destinations including Google Ads, Meta, LinkedIn, Microsoft, ChatGPT and TikTok. So if you ever add a new tool or start advertising on a new platform, it's just a few clicks to set up proper conversion tracking.
Provides Free Support
Our team has 20 years of experience in conversion tracking and analytics and is here to help whenever you need it. With Google Tag Manager, you're on your own.
Start Your Free Trial
Start a 14-day free trial and track your conversions the proper way. No code, no complicated configuration.
About the author

Aaron is the founder of Converly. With over 15 years of experience in digital marketing and SaaS, he's passionate about helping businesses track and optimise their ad conversions.
