For AI agents: the complete documentation index is available at https://docs.clickmax.io/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.io/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.io/en/reference/browser-sdk/tracking.md.
  • English
  • Tracking

    Browser SDK tracking watches interactions on the page and sends those events to Clickmax.

    When to use it

    Use tracking when you want to measure behaviour on the page without building a separate integration for every click or view.

    Events observed

    The SDK can observe events such as:

    • page_view
    • button_click
    • link_click
    • scroll
    • element_visible
    • form_submit
    • contact_captured
    • purchase
    • initiate_checkout
    • scheduling_booked

    Public selectors recognised

    .cm-checkout-button

    Fires button_click.

    [data-cx-track="click"]

    Fires button_click.

    .cm-next-funnel-node

    Fires link_click.

    Fires link_click.

    [data-cx-track="visibility"]

    Fires element_visible when the element enters the viewport.

    Manual tracking

    You can also send events manually with the public API:

    <script>
      cxs('track', 'page_view');
    </script>

    When to combine it with forms

    When the SDK sends a lead successfully, it also records public events that tracking can observe, such as form_submit and contact_captured.

    That means you do not need to implement separate tracking just for forms integrated through the Browser SDK.

    The same applies to creating a lead via JavaScript: when you call cxs('lead', ...) and the request succeeds, the SDK fires contact_captured automatically — with no separate tracking call.

    When to combine it with scheduling

    When a visitor completes a booking in the booking widget (the element marked with data-cx-booking), the SDK fires scheduling_booked automatically — the same event funnel analytics uses to count bookings per step, separate from node progression (the visitor can move through the funnel without booking). No separate tracking is needed.

    If you handle the booking yourself (outside the widget), fire the event manually when it completes:

    <script>
      cxs('track', 'scheduling_booked');
    </script>

    scheduledCallId is optional — the booking count uses the visitor, not the payload. Pass it only if you want to store the booking's identifier alongside the event for traceability:

    <script>
      cxs('track', 'scheduling_booked', { scheduledCallId: 'ID_DO_AGENDAMENTO' });
    </script>