User Journeys
1 variantA path analysis block that traces users from entry page to signup or drop-off in an animated sankey.
Journey sankey
A sankey that traces users from entry page through each step to signup or drop-off. Hover or pin a node to light its full paths, and switch goals to morph every flow to the new data.
User journeys
Entry page to goal, last 30 days
- Conversion
- 50.6%
- Top path
- / → /pricing → /signup
- Biggest drop-off
- /signup at Step 3
"use client";
import { UserJourneys } from "@/components/premium/user-journeys";
export function UserJourneysSankeyPreview() {
return (
<div className="w-full px-4 py-10">
<UserJourneys />
</div>
);
}
Source code is locked
Get access to install premium components and view the full source.
Open dashboardInstall
API Reference
Every prop is optional unless marked required. Data, copy, and colors default to the sample content.
UserJourneys12 props
goalsGoals and their journeys. Defaults to sample Signup, Purchase, Activation.
JourneyGoal[]goalIdControlled selected goal id. Pair with `onGoalChange`.
stringdefaultGoalIdInitial goal id when uncontrolled. Defaults to the first goal.
stringonGoalChangeCalled when a goal tab is chosen.
((id: string) => void)onHighlightChangeCalled when a node is pinned or the pin is cleared.
((highlight: SankeyHighlight | null) => void)pageColorsSVG fill class per page, such as `{ "/pricing": "fill-orange-500" }`.
Record<string, string>paletteFill classes for pages missing from `pageColors`.
string[]convertedColorFill class for the converted outcome.
stringDefault
fill-emerald-500formatValueFormats user counts in labels and the tooltip. Defaults to 1.8k style.
((value: number) => string)heightDiagram height in pixels.
numberDefault
300labelsText overrides, merged over the English defaults.
Partial<UserJourneysLabels>classNameClasses for the card.
string
UserJourneysFooter3 props
summaryRequiredFigures for the selected goal.
JourneySummarylabelsRequiredBlock copy.
UserJourneysLabelsseparatorJoins pages in the top path.
stringDefault
→
UserJourneysHeader4 props
goalsRequiredGoals offered as tabs.
readonly JourneyGoal[]goalIdRequiredSelected goal id.
stringonGoalChangeRequiredCalled with the chosen goal id.
(id: string) => voidlabelsRequiredBlock copy.
UserJourneysLabels
Types4 types
The object types these props take, field by field.
JourneyGoal4 fields
idRequiredStable id, used as the tab value.
stringlabelRequiredTab label, such as "Signup".
stringconvertedLabelRequiredName of the converted outcome node, such as "Signed up".
stringjourneysRequiredEvery path counted for this goal.
Journey[]
UserJourneysLabels13 fields
titleRequiredCard title.
stringdescriptionRequiredShort line under the title.
stringgoalsAriaLabelRequiredAccessible name for the goal tabs.
stringchartAriaLabelRequiredAccessible name for the diagram.
stringcolumnsRequiredColumn headings, entry first and outcome last. Sets the column count.
string[]droppedLabelRequiredName of the drop-off outcome node.
stringusersRequiredWord after user counts in the tooltip.
stringshareOfRequiredJoins a share to its base in the tooltip, as in "38% of /pricing".
stringconversionRequiredFooter label for the conversion rate.
stringtopPathRequiredFooter label for the most common converting path.
stringbiggestDropRequiredFooter label for the step that loses the most users.
stringatRequiredJoins a drop-off page to its column, as in "/features at Step 2".
stringnoneRequiredShown in the footer when no path converted.
string
Journey3 fields
pagesRequiredPages in visit order, entry page first. Up to one per step column.
string[]outcomeRequiredWhether these users reached the goal or left.
JourneyOutcomeusersRequiredUsers who took this exact path.
number
JourneySummary4 fields
totalRequiredUsers who started a journey.
numberconversionRequiredConverted share, 0 to 100.
numbertopPathRequiredPages of the most common converting journey, or null.
string[] | nullbiggestDropRequiredThe page and column that lose the most users, or null.
{ page: string; column: number; users: number } | null