Get common page-visit sequences
umami_get_journeysAnalyze visitor session trails to uncover the most common page-path sequences from entry onward, revealing how users navigate your site.
Instructions
Get the most common sequences of pages visitors take through the site.
Umami has no journey/path-analysis endpoint, so this walks every session's activity trail in the range (capped by max_sessions), reduces each to its ordered page paths (consecutive repeats collapsed), truncates to 'depth' steps, and ranks the most frequent sequences.
Args:
website (string, optional): Website ID, name, or domain.
start_path (string, optional): Only include sessions whose first page matches this path, e.g. '/'.
depth (number): Steps per sequence shown, default 4, max 8.
limit (number): Top N sequences to return, default 10, max 50.
range (string): Date range, default '7d'.
start_date / end_date (string, optional): Explicit bounds, overriding 'range'.
filters (object, optional): Segment filters applied to the session pool.
max_sessions (number): Cap on sessions scanned, default 500, max 2000.
response_format ('markdown' | 'json'): Output format (default: 'markdown').
Returns: JSON shape: { "sequences": [ { "path": string, "sessions": number, "pct": number } ], "matched_sessions": number, "scanned_sessions": number, "total_sessions_in_range": number, "truncated": boolean }
Examples:
"What do people do after landing on the homepage?" -> start_path="/", depth=3
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Steps per sequence shown. | |
| limit | No | Top N sequences to return. | |
| range | No | Date range for the query, default '7d'. Relative ("30m", "24h", "7d", "4w", "3mo", "1y"), named ("today", "yesterday", "this_week", "last_week", "this_month", "last_month", "this_year", "last_year", "mtd", "ytd", "all_time"), or an explicit ISO date via start_date/end_date. | |
| filters | No | Optional segment filters. Supported keys: path, referrer, title, query, browser, os, device, country, region, city, language, hostname, tag, event, distinctId, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, segment, cohort. Example: { country: 'US', device: 'mobile' }. | |
| website | No | Website ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values. | |
| end_date | No | Explicit end date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| start_date | No | Explicit start date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| start_path | No | Only include sessions whose first page matches this path. | |
| max_sessions | No | Maximum sessions to scan. Higher is more accurate but slower (one extra API call per session). | |
| response_format | No | Output format: 'markdown' for a readable summary, 'json' for raw structured data. | markdown |