← Back to Home
NETWORK VISUALIZATION • CASE STUDY

User Journey & Traffic Flow Analysis via Plotly Sankey

Role: Data Analyst (Personal Analytics Project) Timeline: Sep 2026 Stack: Python 3.x, Pandas, NumPy, Plotly (graph_objects.Sankey) Scope: 32,313 Orders • 472,871 Sessions • 1,188,124 Pageviews

1. Dataset, Scope & Business Context

Project Type Personal Project / Simulated Business Case (Maven Fuzzy Factory)
Dataset Source Maven Fuzzy Factory Teaching Dataset (5 CSVs: orders, order_items, products, website_sessions, website_pageviews)
Data Scale 32,313 orders • 472,871 sessions • 1,188,124 pageviews
Time Range & Currency Mar 2012 – Mar 2015 (3 Years) • USD ($)

Standard aggregate bar charts failed to capture how traffic sources filtered into landing pages or the exact product transitions adopted by repeat buyers across multi-touch sessions.

  • Build an Acquisition Sankey Flow: UTM Source → Device → Landing Page → Conversion / Drop-off.
  • Build a Retention Sankey Flow: 1st Purchase → 2nd Purchase → 3rd Purchase.
  • Apply visual data storytelling via selective opacity to emphasize "happy paths" (Conversions & Repurchases) while muting terminal drop-offs.

2. Key Findings & Behavioral Flow Insights

  • Denominator Scope & the "Engaged Leaver" Pattern: Out of 472,871 total sessions, 211,640 (44.8%) were single-pageview bounce sessions and were excluded via a pageviews > 1 filter so Sankey 1 focuses strictly on the 261,231 (55.2%) engaged multi-page sessions. Even within this engaged denominator, the mid-funnel drop-off node dominates over Converted—pinpointing catalog/checkout UX hypotheses beyond initial ad-click quality.
  • Device Conversion Discrepancy: Desktop sessions flow smoothly into the Converted node, whereas Mobile traffic disproportionately terminates at the Drop-off node.
  • The Gateway & Cross-Pollination Journey:
    • The Original Mr. Fuzzy serves as the primary top-of-funnel gateway item, dominating Node 1.
    • Repeat-purchase paths consistently transition from Mr. Fuzzy (Purchase 1) → Love Bear (Purchase 2). Customers rarely purchase the exact same plush toy twice, favoring cross-catalog exploration.

3. Methodology & Analysis Fixes

  • Preventing Circular Link Kernel Crashes: Plotly Sankey diagrams fail when target nodes loop back into identical source nodes. Resolved by prefixing chronological order rankings (1 - Product A → 2 - Product A), ensuring every node in the directed acyclic graph (DAG) remains strictly unique.
  • Memory Optimization on 1M+ Row Joins: Reduced RAM overhead by specifying usecols during pd.read_csv() and aggregating standalone tables via .groupby().first() before performing final joins.
  • Visual De-Noising via Dynamic Link Alpha: Engineered an automated link-coloring loop: assigned terminal paths (Drop-off/End) a muted gray rgba(200, 200, 200, 0.4) while highlighting converted progression paths in vivid amber/emerald.
  • Standardized Acquisition Imputation: Cleaned fragmented NaN and arbitrary unknown UTM source strings into a unified, business-readable Direct Traffic node.

4. Proposed UX & CRM Experiments

  • Mobile UI/UX Audit: Test sticky "Add to Cart" CTAs and lighter mobile media payloads to test whether mobile checkout friction drives the observed drop-off discrepancy.
  • Lifecycle Cross-Sell Trigger: Suppress Mr. Fuzzy promos to existing Mr. Fuzzy owners and A/B test a 14-day post-purchase Love Bear email trigger aligned with the observed repurchase flow.
Evaluation Metrics: Track Mobile Cart-to-Order Conversion Rate (UX audit) and Incremental 30-Day Second-Purchase Rate vs. control group (CRM trigger).