Skip to main content
Cal.com is the scheduling tool behind a lot of demo calls, consultations, and paid sessions. Connecting it to Referly means a booking made by someone who arrived on an affiliate link gets credited to that affiliate, and if you charge for the meeting, the payment turns into commission. Referly ships two separate Cal.com setups, and picking the right one is the first decision you make. They work differently, they’re configured differently, and running both on the same meeting type will double-count your bookings.

Which of the two setups you need

The short version: if money changes hands in Cal.com, use Payment Tracking. If it doesn’t, use Referral Tracking. Payment Tracking also records the booking itself, so you don’t need both.
Don’t set up both on the same meeting type. Each one records the booking separately, so you’d end up with two entries in Referly for a single meeting and pay commission twice.
Both setups live in the same place. In your Referly dashboard, open Settings from the left sidebar, select Integrations, and look for the two Cal.com cards: Cal Referral Tracking and Cal Payment Tracking. Select Instructions on the one you need, and keep that window open, because it has your program’s own details already filled in.

What this integration can and can’t track

Referly only ever hears about a booking being made or paid for. Everything that happens to a meeting afterwards, including cancelling it, moving it, or refunding it, is invisible. If you pay per booked call, decide upfront with your affiliates how you’ll handle meetings that never happen.

Before you start

You’ll need:
  • A live Referly program with at least one affiliate to test with. See setting up your program if you haven’t got that far.
  • A Cal.com account, and the ability to edit the meeting type you want to track.
  • Your Cal.com scheduler embedded on your own website. This is required, not a preference, and the next section explains why.
  • For Payment Tracking: payments already set up on that meeting type in Cal.com, through one of their payment apps.
  • Access to edit your website’s code, or someone who can paste snippets for you.
This trips people up more than anything else in this guide. Referly recognises a referred visitor only on pages carrying the Referly tracking script. You control your own website, so the script can go there. You don’t control cal.com, so it can’t go there. An affiliate link pointing straight at your Cal.com booking page is invisible to Referly, and nothing you set up afterwards can rescue it. Both setups also read the referral out of the page the embed is sitting on, which is another reason the scheduler needs to be on your site rather than somewhere you send people away to.
Tell affiliates to share their Referly link, which points at your own domain and looks like https://your-site.com/?ref=their-code. Bookings from a shared cal.com address can’t be credited to anyone, and there’s no way to recover them later.
Cal.com’s own guide to adding an embed covers getting the code: open Event Types, select the three-dots menu on the meeting type, and choose Embed.

Add the Referly tracking script to your site

Both setups need this. It’s what notices a visitor arriving on an affiliate link and remembers it in their browser for the length of your cookie window. Copy it from Step 1: Tracking clicks in whichever instructions window you opened. Your program’s own identifier is already filled in where YOUR_PROGRAM_ID appears here:
Paste it into the head section of your site, site-wide if you can. On Webflow that’s Site settings, then the Custom code tab, then Head code, followed by publishing. On WordPress, look for a “header scripts” setting in your theme or a header-and-footer plugin. In Google Tag Manager, use a Custom HTML tag firing on All Pages. It has to be on the page holding your Cal.com embed, and on every page an affiliate might send someone to.

Find your embed’s namespace

Both setups need this one small detail, so it’s worth doing before you go further. When you generate an embed, Cal.com gives you a block of code containing a line that looks like this:
The word in quotes after init is the namespace. In that example it’s 15min. It’s usually named after the meeting type, and the rest of the embed code refers back to it, as in Cal.ns["15min"](...). Write yours down. Every snippet below has a placeholder where your namespace goes, and getting it wrong is the single most common reason nothing happens.
Self-hosting Cal.com? The origin in that line points at your own installation rather than https://app.cal.com. Leave whatever Cal.com generated for you exactly as it is.

Set up Referral Tracking

Use this path if your meetings are free. It records each booking as a referred customer with no revenue attached. Copy the script from Step 2: Setting Up Referral Tracking Scripts in the Cal Referral Tracking instructions window, and paste it into your page below the Cal.com embed code, so the embed exists before this runs. Replace INSERT_YOUR_NS_HERE with your namespace, and note that YOUR_PROGRAM_ID is already filled in for you in the version inside Referly:
What this does, in plain terms: the moment someone finishes booking inside your embed, it tells Referly which booking was made and which affiliate referred the visitor. Referly then looks the booking up with Cal.com to get the attendee’s name and email, and records the referral. Bookings by visitors who didn’t arrive on an affiliate link are ignored, so your organic bookings stay untouched. If a meeting has several attendees, each one is recorded against the same affiliate. That’s the whole setup for this path. Skip ahead to the testing section.

Set up Payment Tracking

Use this path if you charge for the meeting through Cal.com. It’s two pieces of work: teaching your embed to carry the referral, then telling Cal.com to notify Referly.

Add the referral to your embed code

Cal.com’s embed generator gives you code like this:
You replace everything from the init line onwards with the version from Step 2: Setting Up Sales Tracking in the Cal Payment Tracking instructions window. There’s an Inline tab and a Floating Buttons tab there, so pick the one matching your embed. Here’s the inline version:
And the floating button version, which differs only in the middle:
Four things to carry across from your own generated code, or the embed will break:
1

Your namespace

Replace every 15min with your own namespace, including inside Cal.ns[...].
2

Your calLink

Replace your-name/15min with the calLink value Cal.com generated for you.
3

Your element selector

For inline embeds only, replace #my-cal-inline-15min with the elementOrSelector value from your generated code.
4

The rest of your config and ui settings

Keep whatever layout and appearance settings Cal.com gave you. The only thing you’re adding is the "metadata[referlyAff]": affLink line inside config. Don’t remove your existing settings to make room for it.
The wrapper around all this exists for a good reason. Referly needs a moment to work out who referred the visitor, and the embed needs to be built with that answer already in hand. This code waits for Referly, then builds the embed, and gives up waiting after two seconds so the scheduler always appears even for visitors who came from nowhere in particular.

Add the webhook in Cal.com

Now tell Cal.com to notify Referly when a booking is made or paid for.
1

Open your webhook settings

In Cal.com, go to Settings, then Developer, then Webhooks. Select New to create one.
2

Paste the subscriber URL

Copy the address shown under Step 3 in the Cal Payment Tracking instructions window and paste it into Subscriber URL. It’s unique to your program and looks like this:
Copy it from Referly rather than typing it out. The part after program_id= tells Referly which program the bookings belong to.
3

Choose the event triggers

Under Event Triggers, select these two and nothing else:
  • Booking Created
  • Booking Paid
Referly ignores every other trigger, so adding more only creates noise.
4

Leave the secret blank

The optional secret field isn’t needed here.
5

Create it

Select Create Webhook. It starts working immediately.
A webhook can be attached to your whole account or to one specific meeting type. Account-level is usually what you want, so any paid meeting type is covered. If you set it at the meeting-type level, remember to add it again for each new paid meeting type you create.
Cal.com’s own reference is their webhooks documentation. If you self-host Cal.com, note that their hosted service only accepts secure addresses, which the Referly address already is. Referly converts the amount into your program’s currency automatically, so a meeting priced in euros still reports correctly in a dollar-based program. The same booking is never counted twice, even though Cal.com sends both a created and a paid notification for it.

Test it end to end

Do this before telling any affiliate the integration is live.
1

Grab a real affiliate link

Open Affiliates in the left sidebar, pick an affiliate, and copy their referral link.
2

Open it in a private window

Use a private or incognito window so old tracking data doesn’t interfere. Land on the page with your Cal.com embed and let it finish loading. This is the moment the referral is recorded.
3

Book a slot

Book through the embed exactly as a customer would, using an email address you haven’t used before. If you’re testing Payment Tracking, go through the payment as well.
4

Check Referly

Open Customers in the left sidebar. The booking should appear within a minute, with the attendee’s name and email and the meeting title, credited to the affiliate whose link you used. With Payment Tracking, the amount and its commission show up alongside it.
5

Check it appeared once, not twice

If you see the same booking twice, you have both setups running on the same meeting type. Remove one.
When the test booking appears once under Customers against the right affiliate, with the right amount if you charged for it, you’re done.
Cancel the test meeting in Cal.com and remove the test referral in Referly so your reports start clean.

How Referly decides who gets the credit

When a visitor lands on your site through an affiliate link, Referly records the click and keeps it in their browser for as long as your cookie window allows. When they book, that stored referral travels with the booking, either passed straight to Referly by the referral script or carried inside the booking itself for Payment Tracking. Referly looks it up and credits the affiliate behind it. If Referly can’t find the exact click, it falls back to matching against your affiliates’ referral codes, which keeps things working when someone clears their cookies mid-visit. Everything depends on that stored referral existing. A booking made in a different browser, on another device, or after your cookie window has run out won’t be credited to anyone. And once a customer is credited to an affiliate, that credit stays put: later clicks from other affiliates don’t take it over.

Limitations to be aware of

  • Only the booking is tracked. Cancellations, reschedules, no-shows, and refunds never reach Referly. A cancelled meeting stays in your reports as a referral.
  • Referral Tracking never records revenue. Bookings arrive with no value. If you want money attached, either use Payment Tracking or add the sale by hand when the deal closes.
  • The visitor must book in the browser they clicked in. Clicking on a phone and booking on a laptop won’t match.
  • A bare cal.com link can never be tracked. Worth repeating in your affiliate onboarding notes.
  • Setup is per embed. A new meeting type embedded on a new page isn’t tracked until you repeat the steps for it.
  • Payment Tracking’s provided setup covers inline and floating button embeds. The pop-up-via-element-click embed isn’t covered.
  • Recurring meeting types are booked once, so they’re recorded once, not once per occurrence.
  • Ad blockers and strict privacy settings stop the tracking script for a small share of visitors, as with any affiliate tool.

Troubleshooting

Something in the replacement didn’t carry across. Check that your namespace, your calLink, and, for inline embeds, your element selector all match what Cal.com generated. Restore the original embed code, confirm the scheduler comes back, then redo the edit one value at a time.
Start with the namespace, which is the usual culprit. It has to be the exact word from the init line of your own embed code, in every place the snippet uses it.Then check the ordering: for Referral Tracking, the script goes below the embed code. Check the tracking script is on that page too. And confirm you published the site after making the changes.
You’re on Referral Tracking, which never records amounts. Switch that meeting type to Payment Tracking, and remove the referral script when you do so you don’t get two entries per booking.If you’re already on Payment Tracking, check that the meeting type actually charges in Cal.com, and that Booking Paid is selected on your webhook.
Both setups are running on the same meeting type. Pick one and remove the other. Payment Tracking on its own covers both the booking and the payment.
The tracking script works and the Cal.com side doesn’t. For Payment Tracking, open your webhook in Cal.com and check its recent deliveries: if nothing was sent, the triggers are wrong; if something was sent but nothing appeared in Referly, the referral isn’t reaching the booking, which points back at the embed code edit.
Referly converts into your program’s currency using the rate at the time of the booking, so the number won’t match your Cal.com price exactly when the two currencies differ. Check your program’s currency in your program settings if the conversion isn’t what you expected.
Still stuck? Book an integration call and we’ll go through your setup with you.

Calendly

The same idea for Calendly bookings.

Universal integration

Track a platform that isn’t listed.

Add a sale

Record revenue that closes after the call.

All integrations

See every platform Referly connects to.
Last modified on July 21, 2026