DEV Community

Howard Shaw
Howard Shaw

Posted on

I built a Sankey chart to map document reading paths

Last week I shipped one of the biggest upgrades to my analytics engine since launch.

I was chasing a simple question. How do people actually move through a document
Not just page views, but start points, re-reads, and drop-off points.

Most tools stop at views or reading time. Useful, but they miss attention flow.

So I added a Sankey chart in DocBeacon to map session-level page transitions.

What I can see now

  • users starting on page 3 instead of page 1

  • loops where a section gets re-read

  • exits right after pricing

Under the hood, this required bigger changes than the UI suggests

  • session stitching

  • transition graph building

  • path weighting

  • sanity checks for noisy sessions

The result feels closer to intent analytics than file tracking.

Next step is turning these paths into actionable signals
content ordering suggestions, confusion hotspots, and lightweight benchmarks for proposals and pitch decks.

Top comments (1)

Collapse
 
howard_shaw_3c36a3a6cb900 profile image
Howard Shaw

Small technical add-on for anyone curious.
I ended up modeling each session as a directed page-transition graph, then aggregating into weighted paths for the Sankey.
I also added guardrails for noisy data. bot-like bursts, ultra-short bounces, and weird refresh loops get down-weighted or dropped.

Early pattern I did not expect. some readers treat pricing as a starting node, not an ending node. that changes how I think about page ordering.