How to track and visualize user journeys using PostHog path analysis

Ever wonder what your users actually do on your site? Not what you think they do, or what the “conversion funnel” says, but the real, messy clicks and jumps they make? That’s what path analysis is for—mapping the actual routes people take. If you’re tired of guessing and want to see how users behave, this guide’s for you.

We’ll walk through tracking and visualizing user journeys with PostHog, an open-source analytics tool that makes path analysis surprisingly doable (even if you’re not a data scientist). I’ll show you what matters, what to ignore, and how to get real value—without drowning in dashboards.


What is Path Analysis (and Why Bother)?

Path analysis maps out the sequence of actions users take on your site or app—think of it like a flowchart of clicks, pageviews, and events. It helps you answer questions like:

  • Where are people dropping off?
  • Are they following the happy path, or getting lost?
  • What unexpected detours do they take?

It’s way more revealing than just looking at conversion rates or single-step funnels. You actually see how people move, not just if they make it to the end.

Should you care? If you want to improve onboarding, spot friction, or just get a reality check on user behavior, yes. If you only care about raw numbers and don’t want to change anything, probably not.


Step 1. Make Sure You’re Tracking the Right Events

Before you can analyze anything, you need to collect the right data. PostHog tracks a lot out of the box, but sloppy event setup leads to useless path charts. Here’s what to keep in mind:

What’s tracked by default?

  • Pageviews: URLs visited by users (automatic for web).
  • Autocapture: Clicks, page changes, form submissions—handy, but noisy.
  • Custom events: Stuff you define, like “Signed Up” or “Clicked CTA”.

Get your event names straight

  • Consistency matters – “Signup_Button_Clicked” vs “SignUpButtonClicked” will show up as separate events.
  • Don’t go overboard – Too many detailed events will crowd your path charts and make them unreadable.
  • Label important steps – Onboarding, checkout, or any “aha!” moment. These should have clear, unique names.

Pro tip: Sketch out your ideal user journey on paper first. What are the key steps? Make sure you’re tracking those, and not just every random click.


Step 2. Set Up PostHog and Integrate Tracking

If you haven’t already, you’ll need to get PostHog running on your site or app.

The basics

  1. Sign up and create a project on PostHog—cloud or self-hosted, your call. Cloud is faster to try.
  2. Install the snippet or SDK:
  3. Web: Drop the JavaScript snippet in your <head>.
  4. Mobile: Use the iOS/Android SDKs.
  5. Backend: There are Python, Node, Ruby libraries if you want to track server-side events.

  6. Verify data is coming in: Click around your site, then check PostHog’s “Live Events” to make sure you see your actions showing up.

Custom events (optional, but worth it)

If you want to track button clicks, signups, or anything beyond pageviews:

  • Use posthog.capture('Event Name', { properties }) in your code.
  • Make sure the event names match what you mapped out earlier.

Ignore this if: You’re just exploring for now. The default autocapture will still show you basic paths, but you’ll get more insight with custom events.


Step 3. Open the Paths Tool in PostHog

Now for the fun part—visualizing the journeys.

  1. In PostHog, go to the “Paths” section (sometimes called “Path Analysis”).
  2. You’ll see an initial Sankey diagram showing the most common flows from the starting point (usually a pageview).

What you’re looking at

  • Nodes: Each circle or box is a page, event, or action.
  • Arrows: Show the most common next steps from each node.
  • Dropoffs: Where users leave the path entirely.

Quick wins

  • Change the starting point: Want to see what happens after someone signs up? Set “Signed Up” as the start node.
  • Filter by user property: Only care about new users, or folks from a certain country? Use the filters.
  • Adjust path type: Choose “Pageview paths” for URLs, or “Event paths” for custom actions (like clicks).

Step 4. Actually Read the Path Visualization

Here’s where most people get stuck: staring at a spaghetti mess of lines and not knowing what to do next. A few pointers:

What’s useful

  • Big drop-offs: If 70% of users bail after one step, that’s probably your biggest leak.
  • Loops and detours: Users keep bouncing between two pages? That’s a sign of confusion.
  • Unexpected steps: Are people exploring features you didn’t think they’d care about? Or skipping steps you thought were essential?

What’s noise

  • Tiny branches: Don’t sweat the 1-2% edge cases.
  • Autocaptured noise: “Clicked div#random” isn’t action-worthy.

Clean up your chart

  • Hide irrelevant events (there’s a filter for that)
  • Combine similar pages (e.g. group all /blog/* URLs)
  • Limit the number of steps or paths shown

Pro tip: Less is more. Focus on the top flows and biggest leaks. If the chart looks like a plate of spaghetti, you’re probably tracking too many granular events.


Step 5. Dig Into Specific Journeys

Path analysis shines when you ask focused questions. Don’t just look at the default chart—zoom in.

Common use cases

  • Onboarding drop-off: Start the path from “Signed Up” and see where new users go next. Are they using the features you want them to?
  • Checkout abandonment: See where people bail between “Started Checkout” and “Order Complete.”
  • Feature discovery: Did anyone actually click that new feature you launched, or are they missing it entirely?

How to do it

  1. Set your “start” (or “end”) event to focus the paths.
  2. Use filters for user type, cohort, or timeframe.
  3. Click on any node to see the users who took that path—super useful for debugging.

Honest take: The more specific your question, the more useful the chart. “What do users do?” is too broad. “Why are new users not completing onboarding?” is actionable.


Step 6. Take Action (Or Don’t)

The goal isn’t to stare at pretty diagrams—it’s to fix things or double down on what works. Here’s how to actually use what you learn:

  • Spot and patch leaks: Big drop-off after step 2? Simplify that page, or add help text.
  • Clear up confusion: If people loop back and forth, your navigation or copy might need work.
  • Promote the hidden gems: Are users who find a certain feature more likely to stick around? Make it more visible.

When to ignore the data

  • Don’t chase every weird path; focus on the highest-traffic ones.
  • If your sample size is tiny, don’t overreact to noise.
  • Don’t sweat “autocaptured” clicks on random elements unless they’re part of your main flow.

What Works, What Doesn’t, and What to Skip

What works well

  • Seeing real user behavior—not just your ideal funnel.
  • Spotting friction and confusion—loops, drop-offs, dead-ends.
  • Comparing cohorts—new users versus power users.

What doesn’t

  • Granular autocapture: You’ll drown in noise if you don’t filter.
  • Overcomplicating setup: If you track every click, you’ll never see the big picture.
  • Expecting “aha” moments instantly: Sometimes the data just confirms what you already suspected.

What to skip

  • Endless tweaking of chart settings for “prettiness.” You want clarity, not art.
  • Tracking vanity events you don’t care about.
  • Overanalyzing rare paths—most of your value is in the top 2-3 flows.

Keep It Simple, Iterate, and Don’t Get Lost

Path analysis with PostHog is powerful, but it’s easy to overthink it. Start small: track the important events, use the default path chart, and look for obvious wins. Don’t obsess over every edge case or try to “optimize” every detail. The most useful insights come from clear questions and simple setup.

If you find yourself lost in a maze of nodes, step back and ask: “What do I really want to know?” Then use the data to make one change at a time. Rinse and repeat. That’s how you actually improve user journeys—one clear step at a time.