Documentation Index
Fetch the complete documentation index at: https://docs.getzenstep.com/llms.txt
Use this file to discover all available pages before exploring further.
Signature
Parameters
The name of the event. Use snake_case by convention.Max length: 255 characters.Examples:
"feature_used", "export_clicked", "onboarding_completed", "video_watched"Optional properties attached to this event. Values can be any JSON-serialisable type.
Examples
Simple event
Event with properties
Track a video watched
Using track events in targeting
Tracked events unlock the Behavior targeting rule type. You can show a flow only after a user has performed an action a specific number of times. Examples:| Rule | Description |
|---|---|
feature_used ≥ 3 times | Show “You’re a power user!” flow after 3 uses |
export_clicked = 0 times (last 7 days) | Show CSV export tooltip if never exported |
onboarding_started > 0 times | Skip re-showing getting started flow |
Event storage
Track events are:- Sent to
POST /api/v1/eventsin batches - Stored in your Zenstep analytics (visible in the Analyze section of the dashboard)
- Used by the targeting engine to evaluate behavior rules on the next page load or navigation
userId — no raw PII is stored.
Difference from analytics events
track() records custom behavioural events — things the user does in your app.
Zenstep’s built-in analytics events (view, complete, dismiss, skip) are emitted automatically when a user interacts with a flow. You don’t need to call track() for those.
Use track() when you want to:
- Trigger flows based on in-app actions (not just URL patterns)
- Build behavioral segments
- Record custom conversion milestones