User Journeys
1 バリエーションA 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>
);
}
インストール
API リファレンス
必須と記された props 以外はすべて省略できます。データ、文言、色はサンプルの内容が既定値です。
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.
string既定値
fill-emerald-500formatValueFormats user counts in labels and the tooltip. Defaults to 1.8k style.
((value: number) => string)heightDiagram height in pixels.
number既定値
300labelsText overrides, merged over the English defaults.
Partial<UserJourneysLabels>classNameClasses for the card.
string
UserJourneysFooter3 個の props
summary必須Figures for the selected goal.
JourneySummarylabels必須Block copy.
UserJourneysLabelsseparatorJoins pages in the top path.
string既定値
→
UserJourneysHeader4 個の props
goals必須Goals offered as tabs.
readonly JourneyGoal[]goalId必須Selected goal id.
stringonGoalChange必須Called with the chosen goal id.
(id: string) => voidlabels必須Block copy.
UserJourneysLabels
型4 個の型
これらの props が受け取るオブジェクト型とそのフィールド。
JourneyGoal4 個のフィールド
id必須Stable id, used as the tab value.
stringlabel必須Tab label, such as "Signup".
stringconvertedLabel必須Name of the converted outcome node, such as "Signed up".
stringjourneys必須Every path counted for this goal.
Journey[]
UserJourneysLabels13 個のフィールド
title必須Card title.
stringdescription必須Short line under the title.
stringgoalsAriaLabel必須Accessible name for the goal tabs.
stringchartAriaLabel必須Accessible name for the diagram.
stringcolumns必須Column headings, entry first and outcome last. Sets the column count.
string[]droppedLabel必須Name of the drop-off outcome node.
stringusers必須Word after user counts in the tooltip.
stringshareOf必須Joins a share to its base in the tooltip, as in "38% of /pricing".
stringconversion必須Footer label for the conversion rate.
stringtopPath必須Footer label for the most common converting path.
stringbiggestDrop必須Footer label for the step that loses the most users.
stringat必須Joins a drop-off page to its column, as in "/features at Step 2".
stringnone必須Shown in the footer when no path converted.
string
Journey3 個のフィールド
pages必須Pages in visit order, entry page first. Up to one per step column.
string[]outcome必須Whether these users reached the goal or left.
JourneyOutcomeusers必須Users who took this exact path.
number
JourneySummary4 個のフィールド
total必須Users who started a journey.
numberconversion必須Converted share, 0 to 100.
numbertopPath必須Pages of the most common converting journey, or null.
string[] | nullbiggestDrop必須The page and column that lose the most users, or null.
{ page: string; column: number; users: number } | null