Cueflow.track()

Track custom events to enable behavioral targeting and automatic checklist completion.

Syntax

Cueflow.track(eventName)
Cueflow.track(eventName, properties)

Parameters

Parameter
Type
Required
Description

eventName

string

Yes

Unique identifier for the event

properties

object

No

Additional event data

Basic Example

// Track a simple event
Cueflow.track('signup_completed');

// Track with properties
Cueflow.track('purchase_completed', {
  amount: 99.99,
  plan: 'pro',
  currency: 'USD'
});

Event Naming

Use snake_case for consistent event names:

Common Events

Onboarding

Feature Usage

Commerce

Engagement

Using Events for Targeting

After tracking events, you can target messages based on user behavior:

Has Done / Has Not Done

Target users who haven't used it:

  • Rule: Event "advanced_export_used" has not done

Event Count

Target power users:

  • Rule: Event "report_created" count greater than 10

Recency

Target inactive users:

  • Rule: Event "dashboard_viewed" last done before 7 days

Automatic Checklist Completion

Events can automatically mark checklist items as complete:

  1. Create a checklist item in the dashboard

  2. Set completion type to "Automatic"

  3. Configure the event trigger (e.g., project_created)

When you track that event:

The checklist UI updates immediately to show completion.

Event Properties

Supported Types

Type
Example

String

plan: "enterprise"

Number

amount: 99.99

Boolean

isFirstPurchase: true

Best Practices

Queuing Behavior

If you call track() before initialization completes, events are queued and sent automatically:

Framework Examples

React

Vue

Vanilla JavaScript

Requirements

  • Must call Cueflow.init() first (events are queued if init is in progress)

  • eventName must be a non-empty string

API vs Embed Script

Use Embed Script
Use API

User interactions (clicks, form submits)

Server-side events (webhooks)

Client-side feature usage

Background jobs

Real-time tracking

Batch processing

For server-side events, use the Events API.

Next Steps

Last updated