Docs
De docs doorbladeren

Add Privatus Analytics to Cal.com

Count Cal.com bookings in your analytics by listening for the embed's booking event on your own website and sending a Booking event without personal data.

Als Markdown bekijken

Booking pages hosted by Cal.com don't take your own scripts. Embed Cal.com on your own site, add the snippet there, and count bookings from the embed's events.

  1. Add the Privatus Analytics snippet to the page that holds the embed:
html
   <script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>
  1. Use the Cal.com embed snippet from your event type's Embed option.
  2. After the embed's Cal("init", ...) call, listen for a new booking:
html
   <script>
     Cal("on", {
       action: "bookingSuccessfulV2",
       callback: function () {
         window.privatus && privatus.track('Booking');
       }
     });
   </script>

If you gave the embed a namespace in init, call Cal.ns.yournamespace("on", ...) instead. Cal.com lists the events in Listening to events. bookingSuccessfulV2 replaces the older bookingSuccessful, and Cal.com notes that the booking may not be confirmed when it fires.

The callback receives booking details such as a title and times. Don't pass them on. The Booking event needs no properties, and it never includes a name or email address.