Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

You need: the Humblytics script in the <head> of your site, your Cal.com embed code, and its namespace. See Cal.com for how to get them.

1. Add the embed

  1. Paste your Cal.com embed code into your page's HTML or template where the calendar should appear.

  2. 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>
  1. Replace 30min with your namespace, and demo-call with 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

  1. Deploy your site.

  2. Open the live page in a private window and make a test booking.

  3. 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 of Cal.ns[...])? Replace Cal.ns["30min"] with Cal in 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