Skip to main content
Custom events let you track user behavior on your site and trigger automations when specific actions occur. Use events to open the chat, show forms, or display messages based on what users are doing.

Quick Start

Fire a custom event from your application:

Event Structure

Events have a name and optional data payload:

Naming Conventions

Use descriptive, snake_case names that follow a consistent pattern:

Setting Up Triggers

Triggers in the dashboard can listen for custom events and perform actions. Create a trigger with:
  1. Trigger Type: Custom Event
  2. Event Name: The exact event name you fire (e.g., checkout_abandoned)
  3. Action: What happens when the event fires

Trigger Actions

Conditional Triggers

Use event data to conditionally trigger actions:
In the dashboard, configure the trigger to only fire when cartTotal > 200.

Common Use Cases

E-commerce Events

SaaS Events

Content & Engagement

User Journey Events

Implementation Patterns

React Integration

Vue Integration

Vanilla JavaScript

Scroll Depth Tracking

Time on Page

Combining with Identity

Events are more powerful when combined with user identity:

Debugging Events

Check the browser console for event confirmation:
Use the Conversations view in the dashboard to see which events triggered during a session.

Best Practices

Be specific but not excessive. Track meaningful actions, not every click. Focus on events that indicate intent or value.
  1. Use consistent naming — Establish a naming convention and stick to it
  2. Include relevant context — Add data that helps understand the event
  3. Avoid PII in event data — Don’t include emails, names, or sensitive info in event payloads (use identify() instead)
  4. Test triggers — Verify events fire correctly before deploying
  5. Document your events — Maintain a list of events and their meanings

Next Steps

Identity

Associate events with user profiles

Webhooks

Send event data to external systems