Skip to content

About

Python analysis measuring customer journey conversion rates to pinpoint checkout bottlenecks and identify optimization opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Funnel Analysis: Identifying Revenue Leaks

UrbanCart is losing 71% of its high-intent shoppers at the very last step of the buying process. Out of 10,000 initial shopping sessions, only 1,004 resulted in a purchase. With an average order value of $276, recovering just 5% of these abandoned checkouts would have added over $33,000 in immediate revenue to this dataset. Fixing the checkout experience is the single biggest opportunity to increase overall revenue.

project-img

📄 Project at a glance

Read the Executive Summary for a concise overview of the business problem, analysis, key findings, and recommendations.


💼 Business Problem

UrbanCart, a growing direct-to-consumer e-commerce platform specializing in lifestyle and apparel goods.

The company has healthy website traffic, but a massive number of potential buyers abandon their carts right before paying. This project tracks how shoppers move through the site to find exactly where they leave, investigate why, and highlight how much money is being left on the table.


🎯 Objective

As a Product Analyst on the Analytics team, my role is to analyze UrbanCart's e-commerce funnel to:

  • map the complete user journey from browsing to buying
  • pinpoint the exact steps causing the most friction
  • provide clear, testable recommendations to fix these leaks and increase sales.

📊 The Funnel Breakdown

We tracked 10,000 user sessions across four main stages to see where shoppers drop off:

Shopping Stage Total Sessions Drop-off from Previous Step
1. Browse 10,000 -
2. Add to Cart 6,949 30.5%
3. Checkout 3,456 50.2%
4. Purchase 1,004 70.9% (The Bottleneck)

Total Conversion Rate: 10.04% (Browse to Purchase)


💰 The Financial Impact

It is not just about losing website traffic; it is about lost money. Because the biggest drop-off happens right before the payment is completed, we are losing shoppers who have already decided to buy.

  • Average Order Value: ~$276
  • Shoppers Lost at Checkout: 2,452
  • Potential Revenue Lost: ~$677,000

We do not need a perfect conversion rate to see a massive financial return. If we improve the checkout flow and save just 5% of those abandoned carts, we recover over $33,000 without needing to spend a single extra dollar on marketing.


📊 Key Findings

1️⃣The Final Step is the Biggest Leak

Checkout → Purchase is the primary conversion bottleneck. The steepest drop-off happens right after a user decides to check out. Nearly 71% of shoppers who make it to the payment page leave without buying.


2️⃣ Mobile Shoppers Struggle More

Shoppers using phones buy less often than those on computers (27.52% vs. 30.12% conversion). This points to a clunky phone checkout experience that is costing us daily sales.

3️⃣ Category Differences

Beauty products are abandoned in the cart more frequently than electronics (26.79% vs. 32.21% conversion). Shoppers might be surprised by shipping costs, out-of-stock notices, or return policies late in the process.


✅ Actionable Recommendations

The funnel data pinpoints where users leave, but not why. Before spending engineering resources on full redesigns, the product team should validate the underlying causes using diagnostic tools and run controlled A/B tests.

1️⃣ Payment Step Friction

  • The Problem: 71% of users who reach checkout abandon before completing the purchase.
  • How to Diagnose First:
    • Check backend logs for payment gateway failure rates or card errors.
    • Use session recordings and form analytics to see which specific checkout field causes users to hesitate or leave.
  • Hypothesis to Test: If unexpected costs (shipping/taxes) or forced account creation are causing drop-offs, testing a transparent cost breakdown earlier in the flow and offering a guest checkout option will increase payment completions.

2️⃣ Mobile Checkout Usability

  • The Problem: Mobile shoppers convert 2.6% lower at checkout than desktop shoppers (27.5% vs. 30.1%).
  • How to Diagnose First:
    • Filter session replays specifically for mobile devices to check for misaligned buttons, hard-to-tap form fields, or slow page loads on smaller screens.
  • Hypothesis to Test: A/B test a simplified, single-screen mobile checkout against the current multi-step flow to measure if reducing mobile tapping improves conversion.

3️⃣ Beauty Category Drop-offs

  • The Problem: Beauty products have the lowest checkout conversion rate (26.8%) compared to Electronics (32.2%).
  • How to Diagnose First:
    • Trigger a short exit-intent survey for Beauty shoppers leaving their carts to ask what stopped them from buying.
  • Hypothesis to Test: If Beauty shoppers leave due to unclear shipping costs or return policies, showing shipping estimates directly on the product page will improve overall conversion.


🛠️ Technical Approach & Methodology

🔧 Tools Used

  • Python (Pandas, NumPy)
  • Data Visualization (Matplotlib, Seaborn)
  • Jupyter Notebooks.

📂 Dataset

The analysis uses event-level e-commerce data containing customer shopping activity across the following funnel stages:

Browse → Add to Cart → Checkout → Purchase

The analysis uses session_id as the primary unit of analysis because the goal is to evaluate individual shopping journeys rather than long-term customer behaviour.

A single user_id can generate multiple sessions, while each session_id represents a distinct shopping journey.


⚙️ The Process

# Analysis Step Description
1 Data Cleaning & Preparation Standardized column formatting, converted text timestamps to standard dates, cleaned text entries, rounded revenue figures, and verified the dataset was free of missing or duplicate records.
2 Funnel Mapping & Volume Tracking Used unique session IDs to track how shoppers moved through each step (Browse → Cart → Checkout → Purchase), measuring conversion rates and pinpointing where the largest drop-offs occurred.
3 Financial Impact Calculation Multiplied the volume of abandoned checkouts by the average order value to convert user drop-offs into exact dollar amounts.
4 Segment Analysis Compared conversion performance across devices, marketing channels, product categories, and regions to isolate specific technical or user experience friction points.

▶️ How to Run This Project

  1. Clone this repository

     		git clone https://github.com/thecss/ecommerce-funnel-analysis.git
     		cd ecommerce-funnel-analysis
    
  2. Install dependencies:

     		pip install -r requirements.txt
    
  3. Launch Jupyter Notebook:

     		jupyter notebook
    
  4. Run the notebooks in order:

  • 01_data_cleaning.ipynb:Prepares, cleans, and validates raw event logs.
  • 02_funnel_analysis.ipynb: Performs funnel logic, segmentation, and visualization.

About

Python analysis measuring customer journey conversion rates to pinpoint checkout bottlenecks and identify optimization opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages