E-commerce Analytics with Python
E-commerce Analytics is an intermediate-level course of 5 lessons (about 1 h 23 min), with 15 exercises and 15 quiz questions. Prerequisites: Business Metrics and KPIs. Exercises run in the browser, with nothing to install.
- Business analytics
- Intermediate
- 5 lessons
- 1 h 23 min
- 15 exercises
- Exercises run in the browser
The course in brief
This course applies data analysis to the questions of an online store: which segment earns the most per visit, when customers come back, how each cohort evolves, which products to recommend together and which customers to re-engage. You work with pandas on fictional data and finish with a monthly dashboard for the store.
What you will be able to do
- Break revenue down into sessions, conversion, average order value and RPV, and analyze the distribution of order values
- Compute repurchase delays and 90-day repurchase rate by applying a maturity rule
- Build and read a cohort retention matrix and cumulative revenue per customer
- Compute support, confidence and lift and build a simple recommendation with a fallback
- Segment customers with RFM and build a monthly new vs. returning dashboard
Syllabus: 5 lessons
- Break a store's revenue down into sessions, conversion and average order value
- Compute revenue per visit (RPV) by segment and overall
- Analyze the distribution of order values (median, extreme values, free-shipping threshold)
- 02
Retention and repurchase: delays between orders and maturity
- Compute the delay between two successive orders from the same customer
- Compute a 90-day repurchase rate while accounting for customer maturity
- Use these metrics to time re-engagement actions
Delay between ordersRepurchase within a windowMaturity and censored data
- 03
Cohort analysis: retention and revenue by arrival month
- Assign each customer to a cohort (month of first purchase) and compute the age of each order
- Build and read a triangular retention matrix
- Compute the cumulative revenue per customer of each cohort
Acquisition cohortRetention matrixCumulative revenue per customer
- 04
Recommendations: products bought together
- Count pairs of products bought together in baskets
- Compute support, confidence and lift of an association
- Build a simple "frequently bought together" recommendation with a fallback
Product co-occurrenceSupport, confidence and liftSimple recommendation
- 05
Store dashboard and RFM segmentation
- Segment customers with RFM scores (recency, frequency, monetary) based on explicit thresholds
- Build a monthly dashboard distinguishing new and returning customers
- Choose the metrics of a store dashboard and link them to actions
Final project
Analysis report for a fictional online store
Using data generated in Python (fixed seed) for a fictional store over 18 months: sessions by device, orders with product lines and customers, produce a complete analysis report. Break down revenue, study the distribution of order values, measure repurchase with maturity, build the cohort matrix, suggest product pairs to recommend and segment customers with RFM, then assemble a monthly dashboard and three action recommendations.
Deliverables
- A reproducible Python script or notebook
- The table of levers by device (conversion, average order value, RPV) and the analysis of the order value distribution
- The median repurchase delay and the 90-day repurchase with a maturity rule
- The cohort retention matrix and the cumulative revenue per customer curve
- The table of product pairs (support, confidence, lift) and the recommendation function
- The RFM segmentation with justified thresholds and the monthly new / returning dashboard
Assessment criteria
- Ratios are computed on sums and the median accompanies the mean
- Customer maturity and the unknown cells of the cohorts are handled correctly
- Recommendations rely on a minimum number of co-occurrences and provide a fallback
- RFM thresholds are written down, justified by the purchase cycle and linked to actions
- Conclusions distinguish observed associations from causal effects, to be tested with A/B
Frequently asked questions
How does this differ from the Business Metrics and KPIs course?
DA2 lays down the definitions (average order value, churn, customer value). This course goes deeper for an online store: revenue per visit, repurchase with maturity, cohorts, recommendations and RFM segmentation.
Do I need an online store to take the course?
No. All the exercises use fictional data built in the code. You can then apply the same calculations to your own store's exports.
Does the course cover machine learning for recommendations?
It presents a transparent method based on products bought together (support, confidence, lift), which is a solid foundation before more advanced approaches.
How is customer data handled?
The examples are fictional. The course reminds you that recommendations based on the history of an identified customer must respect the store's privacy policy and consent choices.
This course, told for your job
Say what you want to be able to do: “E-commerce Analytics” takes its place in your path, with examples from your field. The concepts stay those of the course.