Tracking Overview

Clarm captures page and widget activity automatically, and exposes window.ClarmTrack.track(...) for optional identify, purchase, and custom event tracking.

Automatic tracking

After the loader initializes, Clarm automatically records:

  • Page activity such as page views and navigation changes
  • Widget activity such as opens, messages, and CTA interactions
  • Commerce signals such as payment-page or payment-success heuristics when detected

Manual events

Use window.ClarmTrack.track to attach user identity or business events:

ClarmTrack APIjavascript
// Identify a known user
window.ClarmTrack?.track('identify', {
  email: '[email protected]',
  name: 'Jane Smith',
  company: 'Acme Inc',
  plan: 'enterprise'
});

// Track a purchase / conversion
window.ClarmTrack?.track('purchase', {
  amount: 299.00,
  currency: 'USD',
  plan: 'growth',
  orderId: 'ord_123'
});

// Custom event
window.ClarmTrack?.track('click', {
  element: 'pricing_cta',
  page: '/pricing'
});

// Goal achieved
window.ClarmTrack?.track('goal_achieved', {
  goal: 'demo_booked',
  value: 500
});
i

The widget sends events to the canonical tracking endpoint for your dashboard origin. Most teams only need to add identify and purchase manually.

Event payload

Clarm attaches common browsing context automatically:

  • visitor_id — persistent anonymous ID (localStorage)
  • session_id — current browsing session
  • timestamp — ISO 8601 UTC
  • url — current page URL
  • referrer — HTTP referer header
  • user_agent — browser user agent

Attribution and enrichment

Conversation history, tracked events, and available enrichment data are joined in the dashboard so you can see which pages, messages, and downstream actions preceded a lead or conversion.

You will see the results in Dashboard → Visitors, Analytics, and Conversions.

  • Known identity from your identify calls
  • Tracked revenue from purchase events
  • Behavior context from page, widget, and CTA events

Common use cases

  • Identify a user after sign-in so conversations map to a real account owner
  • Track purchases or booked demos for conversion reporting
  • Push the same events into Slack, HubSpot, or your own webhook workflow

For code examples, continue to the tracking API guide or the e-commerce examples.