E-commerce · Funnel analytics · A/B testing

Product Funnel & Conversion Optimization

Where is an e-commerce brand losing customers, why, and what should it fix first? I took 80,000 sessions of messy clickstream data from raw export to a costed, tested recommendation.

Solo project · end to endNov 2026

The problem

ShopNest, a fictional Indian D2C brand, gets about 80,000 sessions a quarter but only 3.4% become orders. Two-thirds of traffic is mobile, and the product team had just launched a one-page checkout experiment. Leadership wanted to know which step loses the most customers, which segments under-perform, whether the new checkout works, and what each fix is worth in rupees.

The data

A reproducible synthetic clickstream (sessions, events, orders) with the problems real exports have: bot traffic, duplicate events, mixed timestamp formats and test orders. A cleaning pipeline handles each one and validates that every session's funnel steps happen in order.

Approach

  1. Data quality first

    Bot detection, de-duplication, timestamp parsing and funnel-order validation, so every later number is trustworthy.

  2. Exploratory analysis

    Funnel by device, channel, city tier, page speed and visitor type, plus timing and payment behaviour.

  3. SQL deep-dive

    Seven DuckDB queries (CTEs, UNPIVOT, window functions, QUALIFY, QUANTILE_CONT) rank each segment's weakest step and size every lever in ₹.

  4. A/B test, done properly

    Sample-ratio and balance checks, primary metric with confidence interval, mechanism and guardrail metrics, Bonferroni correction, regression adjustment and power.

  5. Dashboard

    An interactive Plotly dashboard with KPIs, a segment-filterable funnel, A/B lift and opportunity sizing.

What I found

What each fix is worth (closing half the gap to a realistic benchmark)
PriorityLeverEst. extra revenue
1Mobile checkout UX~₹26 L / year
2Page speed under 3s~₹11 L / year
3Paid social landing pages~₹3 L / year
4Card payment success~₹2.6 L / year

Charts

Overall funnel with drop-off at each step
Overall funnel with drop-off at each step
Step conversion by segment: where each segment under-performs
Step conversion by segment: where each segment under-performs
Revenue opportunity for each lever
Revenue opportunity for each lever
One-page checkout A/B test results
One-page checkout A/B test results

Live dashboard

Interactive: filter by segment and hover any chart. Open full screen ↗

The key insight

Conversion rose from about 2.4% to 4.0% over the quarter, but returning visitors rose from 23% to 79% of traffic at the same time. A before/after comparison would have wrongly credited the new checkout, so the decision rests on the randomised A/B test: 3.55% → 4.16% (+0.61 pp, 95% CI +0.25 to +0.98 pp). Recommendation: roll out to mobile now and to desktop with a small holdout, then fix page speed (~₹11 L/yr, to be confirmed by a test).

Limitations & next steps

Tools