User Flows
Flows let you tag a sequence of pageviews and custom events as a named journey. Once tagged, the dashboard shows a Sankey diagram of how users move through the flow, a table of the most common paths, and a funnel analysis tool for measuring conversion between steps.
Basic usage
Section titled “Basic usage”Wrap the events you care about with startFlow() and endFlow():
tribe.startFlow("checkout");
// These events are now tagged as part of the "checkout" flowtribe.track("cart_viewed", { items: 3 });// ...user navigates to /checkout, pageview is auto-trackedtribe.track("payment_submitted", { method: "wallet" });
tribe.endFlow();Every pageview and custom event between startFlow() and endFlow() gets associated with that flow name. The flow name stays active across page navigations until you explicitly end it.
How it works
Section titled “How it works”- Tag events —
startFlow("name")sets a flow context. All subsequent events include the flow name untilendFlow()clears it. - Daily aggregation — A background job groups events by session and counts transitions between consecutive steps (e.g.,
/products→/checkout→payment_submitted). - Query in dashboard — The Flows tab on the Analytics page shows the aggregated data as a Sankey diagram, top paths table, and funnel analysis.
Examples
Section titled “Examples”Onboarding
Section titled “Onboarding”tribe.startFlow("onboarding");tribe.track("signup_completed");// user lands on /welcome, then /setuptribe.track("profile_completed", { hasAvatar: true });tribe.track("first_project_created");tribe.endFlow();Checkout
Section titled “Checkout”tribe.startFlow("checkout");tribe.track("cart_viewed", { itemCount: 2, total: 59.99 });tribe.track("shipping_selected", { method: "express" });tribe.track("payment_submitted", { method: "card" });tribe.track("order_confirmed", { orderId: "ORD-123" });tribe.endFlow();Feature adoption
Section titled “Feature adoption”tribe.startFlow("export-wizard");tribe.track("export_started", { format: "csv" });tribe.track("columns_selected", { count: 8 });tribe.track("export_completed", { rows: 1250 });tribe.endFlow();Dashboard features
Section titled “Dashboard features”Sankey diagram
Section titled “Sankey diagram”The Sankey view shows every transition between events in the flow. Thicker bands mean more sessions took that path. Use the filters to adjust:
- Max steps — how deep to trace the flow (default 5)
- Min sessions — hide low-traffic transitions
- Starting event — focus on paths beginning from a specific page or event
Top paths
Section titled “Top paths”A table of the most common event sequences, ranked by session count. Each row shows the full path and average duration from first to last step.
Funnel analysis
Section titled “Funnel analysis”Define a funnel by selecting 2–6 events in order. Tribe calculates:
- Conversion rate — percentage of sessions that completed all steps
- Dropoff rate — percentage lost at each step
- Strict vs. loose — strict mode requires events in exact order; loose mode just checks that each event occurred
Script tag usage
Section titled “Script tag usage”<script> Tribe.startFlow("signup"); // ... user actions ... Tribe.endFlow();</script>- Flow names should be short, descriptive, and lowercase:
checkout,onboarding,export-wizard - Unnamed events still appear in the Sankey diagram — flows without a name show all session transitions
- You can have only one flow active at a time. Calling
startFlow()while a flow is already active replaces the current flow name - Events are sent via
sendBeacon, soendFlow()doesn’t flush anything — it just clears the flow tag for future events
SDK reference
Section titled “SDK reference”| Method | Description |
|---|---|
startFlow(name) | Start tagging events with a flow name |
endFlow() | Stop tagging events with the current flow name |