Docs

Tracking events and consent

Connect the three browser events to GTM or your consent banner without sending personal data.

These are browser analytics events, separate from signed workspace webhooks. Calberry pushes them into window.dataLayer; your website loads and configures GTM, GA4 or Meta tags. The hosted booking page does not load per-link container or pixel IDs.

Events and fields

EventTrigger
form_startedFirst form-field input; omitted in headless calendar-only mode.
lead_capturedContact capture has been accepted.
booking_confirmedBooking succeeded, including a booking still waiting for guest confirmation.

The names are fixed. The payload contains only event, funnel_id, mode, language, lead_id and booking_id. Unknown IDs are null. Do not add names, email, phone, answers or hashed email addresses.

{
  "event": "booking_confirmed",
  "funnel_id": "funnel_example",
  "mode": "calendar_first",
  "language": "en",
  "lead_id": "lead_example",
  "booking_id": "booking_example"
}

Retries/reloads are deduplicated using lead/booking IDs within the same browser session. Without session storage, deduplication only lasts within the current document. A new form journey starts after a successful booking. Do not add duplicate pushes around the embed.

By default, events wait for Google Consent Mode v2 to grant either analytics_storage or ad_storage, or for an explicit setTrackingConsent(true) call. Your GTM still decides which tags may run for each category, including its additional advertising consent requirements.

For banners such as Framer Cookie Banner or Borlabs, set tracking-consent="callback" and call the method from a real banner decision. This mode ignores Consent Mode commands, avoiding synthetic default refusals being treated as a completed user choice.

<booking-embed id="booking"
  src="https://book.calberry.ai/your-workspace/your-link"
  tracking-consent="callback"></booking-embed>
<script type="module" src="https://book.calberry.ai/assets/embed.js"></script>
<script>
  // Connect this function to your actual banner, not to its initial defaults.
  async function onActualBannerDecision(granted) {
    if (typeof granted !== 'boolean') return;
    await customElements.whenDefined('booking-embed');
    document.querySelector('#booking')?.setTrackingConsent?.(granted);
  }
</script>

Deliver saved decisions again after reload and call with false on withdrawal. Before the first grant, waiting events stay in memory. An explicit refusal permanently discards queued events and events generated while refused; a later grant does not recover them.

Use tracking-consent="host" only if your own GTM fully handles tag consent. It permits immediate dataLayer pushes and session deduplication storage. It is an explicit host responsibility, not the default installation.

GTM, GA4 and Meta

In GTM, create a Custom Event trigger matching ^(form_started|lead_captured|booking_confirmed)$. Create Data Layer Variables for the five payload fields and map them into your own permitted analytics events. Keep the tags' consent checks. No Meta Conversions API integration is provided by these browser events.

For Framer's child frame and concrete consent-manager recipes, use the existing tracking guide. The frame bridge forwards only supported same-origin srcdoc events to the direct parent's dataLayer and consent context.

Browser storage

booking-tracking:v1 contains tracking anchors/IDs after consent; explicit host delegation also allows these markers. booking:<funnel_id> is the functional form draft, independent of tracking consent. Both use origin-scoped session storage until the tab ends or the storage is cleared. In a fully custom API UI, preserve the same consent, payload and deduplication rules.

On this page