Skip to main content

Path and Journey Analysis

Path analysis counts observed sequences. It does not recover a person's intended journey. The result depends on event vocabulary, ordering clock, tie-breaks, identity, session boundaries, repeated events, truncation, and which starting population was selected.

Prerequisites​

Complete behavioral segmentation. Use the same four-actor eligible population and the same consent and validation filters.

Learning goals​

  • Define event order, tie-breaks, inclusion, truncation, and repeated-event handling.
  • Compute transparent adjacent-transition counts.
  • Recognize survivorship, instrumentation, and high-cardinality bias.
  • Avoid interpreting a frequent path as an optimal or causal journey.

Ordering and compression​

This example sorts within actor by occurred_at, then event_id. The reception clock controls the restated close. It preserves repeated event names rather than silently collapsing them, does not cross actor boundaries, and counts every adjacent pair. In a production journey analysis, declare whether sessions break paths and whether page parameters are normalized before counting.

Top-k displays truncate the tail. An “other” bucket can contain many distinct, important, or accessibility-specific paths. Always retain the denominator, total transition count, and coverage of the displayed nodes.

Metric contract​

  • Population: resolved actors with at least one valid, consented product-measurement event in the restated fixture.
  • Unit: adjacent ordered event transition within actor.
  • Observation window: events occurring during 2026-10-01 UTC and received by the 2026-10-04 restated close.
  • Denominator: seven observed adjacent transitions across four eligible actors; actor and transition shares use different denominators.
  • Missingness: invalid, denied, uninstrumented, or truncated actions create gaps; a missing node is not necessarily skipped behavior.
  • Identity: fixed 2026-10-02 snapshot; paths never join across unresolved identifiers or infer shared-device people.

Worked example​

import json
from collections import Counter, defaultdict
from datetime import datetime
from pathlib import Path

root = Path("tests/fixtures/product-analytics")
rows = [json.loads(line) for line in (root / "events-v1.jsonl").read_text().splitlines()]
plan = json.loads((root / "tracking-plan-v1.json").read_text())
parse = lambda value: datetime.fromisoformat(value.replace("Z", "+00:00"))
deduped = {}
for row in sorted(rows, key=lambda item: parse(item["received_at"])):
deduped.setdefault(row["event_id"], row)
def valid(row):
required = plan["events"][row["event_name"]]["required_properties"]
kinds = {"string": str, "boolean": bool}
return all(key in row["properties"] and isinstance(row["properties"][key], kinds[kind]) for key, kind in required.items())
def actor(row):
return row["user_id"] or plan["identity_snapshot"]["links"].get(row["anonymous_id"], row["anonymous_id"])
paths = defaultdict(list)
for row in deduped.values():
if row["analytics_consent"] and row["purpose"] == "product_measurement" and valid(row):
paths[actor(row)].append((parse(row["occurred_at"]), row["event_id"], row["event_name"]))
transitions = Counter()
for events in paths.values():
names = [name for _, _, name in sorted(events)]
transitions.update(f"{left}>{right}" for left, right in zip(names, names[1:]))
top = sorted(transitions.items(), key=lambda item: (-item[1], item[0]))[:2]
print(f"actors={len(paths)} transitions={sum(transitions.values())} top={top}")
print("order=occurred_at tie_break=event_id late_events=included_at_restatement")

Expected output:

actors=4 transitions=7 top=[('page_view>signup_started', 2), ('signup_started>account_created', 2)]
order=occurred_at tie_break=event_id late_events=included_at_restatement

Limitations and common mistakes​

  • Sorting by warehouse arrival and calling that user behavior.
  • Removing repeated events that may reveal retries or loops.
  • Showing only successful actors, creating survivorship bias.
  • Comparing paths across platforms with different instrumentation coverage.
  • Claiming a common path caused conversion or is the route users prefer.

Practice​

Recompute paths by session rather than actor and predict which transitions disappear. Define a rule for simultaneous timestamps, repeated page views, and paths longer than ten nodes. Report top-path coverage, not just ranks.

Next steps​

Attribution and its causal limits assigns descriptive credit while separating that bookkeeping rule from intervention effects.

Primary sources​

Checked 2026-10-19: Google Analytics path exploration, OpenTelemetry event timestamp conventions, and W3C privacy principles.