Events

Event properties and client-side tracking guidance.

Last reviewed

Events

Use events to send product activity that can help with targeting, segmentation, and analysis.

We recommend sending product events server-side through a connected integration such as Segment. Server-side events are usually more complete, less affected by browser blockers, and easier to keep consistent across platforms.

If client-side tracking fits your app better, use the widget track() method.

Track method

client.track("Checkout Started", {plan: "pro",source: "billing_page",step: 1,renewedAt: "2026-05-08T04:30:00.000Z",});

track() accepts:

FieldRequiredShape
eventNameYesA string, trimmed, 1-255 characters.
propertiesNoAn object with string keys and JSON-serializable values.

Event names

Use names that describe something that happened, such as:

  • Checkout Started
  • Plan Upgraded
  • Report Exported

Properties

Properties must be an object at the top level:

client.track("Checkout Started", {plan: "pro",seats: 12,trial: false,coupon: null,renewedAt: "2026-05-08T04:30:00.000Z",experiments: ["pricing_v2", "checkout_refresh"],billing: {interval: "annual",currency: "USD",},});

Supported property values are:

  • strings
  • numbers
  • booleans
  • null
  • arrays of supported values
  • nested objects with string keys and supported values

Send dates as ISO 8601 strings. Avoid functions, class instances, DOM nodes, undefined, and circular objects. Convert those values before calling track().

You can call track() before or after login. When the same person is later identified, Identity resolution merges their events into a single profile.

When defaultConsent is "pending" or analytics consent is denied, client-side event delivery follows the widget consent state.