Track your Calendly scheduling activity directly in Trackdesk to attribute bookings and leads to your affiliates. This integration allows you to capture visitor emails and record lead conversions automatically when a meeting is scheduled.
⚠️ Important: This integration requires you to host a dedicated Thank You page on your own website rather than using the default Calendly confirmation page.
Before you start
Ensure you have completed the Quick setup guide in your Trackdesk account.
Locate your Tenant ID and Revenue Origin ID by clicking the Your Trackdesk identifiers button in the upper right corner of the Settings main page.
Prepare a dedicated Thank You page on your website where users will be redirected after booking.
Step-by-step integration
Step 1: Install the click script
To track affiliate clicks, you must first add the click script to every page of your website that affiliate traffic lands on.
<!-- Trackdesk tracker begin -->
<script async src="//TENANT_ID.trackdesk.com/main.js"></script>
<script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");
trackdesk("TENANT_ID", "click");
</script>
<!-- Trackdesk tracker end -->
Replace TENANT_ID with your Tenant ID.
Step 2: Configure the Calendly redirect
Configure Calendly to send invitees to your Thank You page and pass the booking details through the URL.
In Calendly, go to the Scheduling page and locate your event type.
Open the three dots menu for that event type and select Edit.
Select More options at the bottom of the editor.
Expand the Confirmation page section and, under After booking, select Redirect to an external site.
Enter the URL of your Thank You page.
Select Pass event details to your redirected page. This step is required: it adds the invitee's email to the redirect URL so the tracking script can read it.
For more details, see Calendly's guide on how to redirect invitees to another site after booking.
Step 3: Add tracking scripts to your thank-you page
Add the following scripts to your Thank You page to capture the invitee's email (External CID) and record the lead.
Capture user email (External CID)
This script captures the invitee's email from the URL parameters provided by Calendly.
<!-- Trackdesk tracker begin -->
<script async src="//TENANT_ID.trackdesk.com/main.js"></script>
<script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments);};})(window,"trackdesk","TrackdeskObject");
trackdesk("TENANT_ID", "externalCid", {
"externalCid": { "queryParam": "invitee_email" },
"revenueOriginId": "REVENUE_ORIGIN_ID"
});
</script>
<!-- Trackdesk tracker end -->
Replace these values:
TENANT_ID: your Tenant IDREVENUE_ORIGIN_ID: your Revenue Origin ID
Optional: Track lead conversions
To also record a lead conversion, add this script to the same page.
<!-- Trackdesk tracker begin -->
<script async src="//TENANT_ID.trackdesk.com/main.js"></script>
<script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments);};})(window,"trackdesk","TrackdeskObject");
trackdesk("TENANT_ID", "conversion", {
"conversionType": "lead",
"customParams": {
"advS1": { "queryParam": "invitee_email" }
}
});
</script>
<!-- Trackdesk tracker end -->
Replace TENANT_ID with your Tenant ID. If your lead Conversion Type uses a different code, replace lead with that code.
Testing the integration
To verify the setup, follow these steps using a new anonymous/incognito window to ensure a clean test environment:
Generate a click: Copy a tracking link from an offer's Affiliate Tracking section and paste it into your browser.
Verify click: Check the Clicks report in Trackdesk to ensure the click was recorded.
Complete booking: Fill out the Calendly form and wait to be redirected to your Thank You page.
Verify data: Check the External CID column in your click record; it should now display the email used in the booking.
If using the lead script, confirm a lead conversion appears and is attributed to that click.
