Custom/Self-Hosted – How to Track Cal.com Booking Submissions
Embed Cal.com on any custom or self-hosted site with a small snippet that records each booking in Humblytics.
1. Add the embed
Paste your Cal.com embed code into your page's HTML or template where the calendar should appear.
Directly below it, paste this snippet:
<script>
// Runs when someone completes a booking
Cal.ns["30min"]("on", {
action: "bookingSuccessfulV2",
callback: function () {
window.Humblytics.trackFormSubmission("demo-call");
},
});
</script>Replace
30minwith your namespace, anddemo-callwith the name you want to see in Humblytics.
Using React? With @calcom/embed-react, get the API with getCalApi({ namespace: "30min" }), then call cal("on", { action: "bookingSuccessfulV2", callback: ... }) with the same callback.
2. Deploy and test
Deploy your site.
Open the live page in a private window and make a test booking.
In Humblytics, go to Observe → Analytics → Forms and look for your booking name within a minute or two.
Not showing?
The namespace in the snippet must match the one in your Cal.com code exactly.
The snippet must run after the Cal.com code.
Your embed code has no namespace (it uses
Cal("inline", ...)instead ofCal.ns[...])? ReplaceCal.ns["30min"]withCalin the snippet.If your site uses a Content Security Policy, allow
app.cal.com.
Cancel the test booking in Cal.com afterward so it doesn't stay on your calendar.
Last updated