E-Commerce

Chapter 11
E-Commerce Analytics and Decision Making

Bachelors Program in IT
E-Commerce   •   Bachelor

E-Commerce Analytics and Decision Making

Introduction

E-commerce analytics is the systematic collection, measurement, interpretation, and use of digital commerce data to improve business decisions. It connects customer behaviour—such as searching, viewing products, adding items to a cart, and completing payment—with commercial outcomes such as revenue, profit, retention, and operational efficiency.

Analytics is not simply the production of reports. A report describes what happened; effective analytics helps explain why it happened, estimates what may happen next, and supports a defensible decision about what should be done. For example, a fall in conversion rate may result from poorer traffic quality, a payment failure, an inaccurate product description, slow page performance, or an external event. Each cause requires a different response.

A useful analytical process is:

  1. Define the business question.
  2. Specify the decision and success criteria.
  3. Identify suitable data and metrics.
  4. Check data quality and possible bias.
  5. Analyse patterns using funnels, cohorts, segments, and experiments.
  6. Make and implement a decision.
  7. Monitor the result and revise the decision when evidence changes.

Learning Objectives

By the end of this chapter, students should be able to:

  • distinguish descriptive, diagnostic, predictive, and prescriptive analytics;
  • define key performance indicators (KPIs) for traffic, conversion, acquisition, retention, profitability, and operations;
  • construct and interpret an e-commerce funnel;
  • use segmentation and cohort analysis appropriately;
  • design useful dashboards rather than collections of unsupported metrics;
  • explain the logic and limitations of A/B testing;
  • identify data-quality problems, attribution limitations, and analytical bias;
  • apply analytics to an e-commerce decision and communicate a recommendation.

1. From Data to Decisions

E-commerce data comes from web and mobile events, orders, customer accounts, advertising platforms, search systems, email systems, inventory applications, payment gateways, logistics systems, and customer-service records. These sources often use different identifiers and definitions. A customer may appear as an anonymous browser in one system, a logged-in user in another, and a purchaser identified by email in a third.

Analytics commonly operates at four levels:

LevelMain questionTypical output
DescriptiveWhat happened?Revenue report or traffic trend
DiagnosticWhy did it happen?Funnel and segment analysis
PredictiveWhat is likely to happen?Demand or churn forecast
PrescriptiveWhat should we do?Budget, price, or promotion recommendation

A KPI is a metric explicitly linked to an organizational objective and decision. Not every metric is a KPI. Page views may be useful for diagnosing awareness, but they are not automatically important to a business whose objective is profitable repeat purchasing.

A sound KPI has a clear definition, owner, data source, time period, population, unit, and decision relevance. Definitions must also specify exclusions. For example, “conversion rate” should state whether it means orders divided by sessions, users, or visitors, and whether cancelled orders are removed.

2. Core E-Commerce KPIs

2.1 Traffic and engagement

Traffic KPIs describe the volume and quality of visits.

  • Users or visitors: distinct identified or estimated visitors during a period.
  • Sessions: visits, normally bounded by an inactivity rule or explicit session event.
  • Page or screen views: content-loading events.
  • Engagement rate: the proportion of visits meeting a defined engagement condition.
  • Product-view rate: product-detail views divided by sessions or users.
  • Search usage: the proportion of visits using internal search and the success rate of those searches.

Traffic volume alone is insufficient. A campaign can increase sessions while reducing conversion and contribution profit if it attracts people with little purchase intent.

2.2 Conversion and funnel KPIs

A funnel represents stages through which some visitors progress. A simplified commerce funnel is:

Visit → Product view → Add to cart → Checkout started → Payment completed → Order fulfilled → Repeat purchase

For a stage conversion rate:

ri = Ni+1 ÷ Ni

where Ni is the number of entities reaching stage i, and Ni+1 is the number reaching the next stage. The entities should be defined consistently—for example, users or sessions—and the observation period and attribution rules must be the same.

The overall funnel conversion from stage 1 to stage k is:

R = Nk ÷ N1

If 10,000 sessions produce 2,000 product views, 600 cart additions, 300 checkout starts, and 240 completed orders, the stage rates are 20%, 30%, 50%, and 80%. Overall session-to-order conversion is 240 ÷ 10,000 = 2.4%. Multiplying the stage rates also gives 0.20 × 0.30 × 0.50 × 0.80 = 0.024, or 2.4%, provided the stages refer to the same eligible population and period.

Important conversion measures include:

  • Conversion rate: completed orders divided by the chosen denominator.
  • Add-to-cart rate: cart additions divided by product views or sessions.
  • Checkout completion rate: completed orders divided by checkout starts.
  • Average order value (AOV): revenue divided by number of completed orders.
  • Units per order: units sold divided by orders.

Averages may conceal important differences. AOV can rise because a few customers buy expensive products while most customers experience no improvement. Median order value and distributional analysis can therefore supplement the mean.

2.3 Acquisition KPIs

Acquisition metrics evaluate the cost and value of attracting customers.

CPA = Acquisition
divided
greater-than ext{-}or ext{-}equal o Cost ÷ Attributed
ew Customers

In ordinary text, customer acquisition cost is commonly written as:

CAC = Total ext{ acquisition cost} ÷ New ext{ customers acquired}

CAC should state whether it includes advertising only or also agency fees, creative production, salaries, discounts, and technology. A related measure is return on ad spend:

ROAS = Attributed ext{ revenue} ÷ Advertising ext{ spend}

ROAS is not profit. If product cost, fulfilment, returns, and discounts are high, a campaign with a ROAS above 1 may still destroy value.

Attribution assigns credit for an outcome to marketing touchpoints. Last-click attribution gives all credit to the final recorded interaction; first-click gives all credit to the first; linear attribution distributes credit across selected touchpoints. These are rules, not observations of true causality. Incrementality experiments, holdout groups, and controlled geo-tests often provide stronger evidence about whether marketing caused additional orders.

2.4 Retention and customer value

Retention measures whether customers continue to buy or remain active. A basic repeat-purchase rate is:

Repeat ext{-}purchase rate = Customers ext{ with two or more purchases} ÷ Customers ext{ in the cohort}

The time window must be specified, such as 90 days or 12 months. Retention is often analysed by cohorts: groups of customers sharing a starting event, usually the month of first purchase. A cohort table may show the percentage active in months 0, 1, 2, and subsequent periods. Cohorts reveal whether recent customers behave differently from earlier customers and prevent growth in total customers from masking declining loyalty.

A simplified customer lifetime value estimate is:

CLV ≈ m × p × L − CAC

where m is contribution margin per purchase, p is expected purchase frequency per period, L is expected customer lifetime in periods, and CAC is customer acquisition cost. This is a simplified planning model. It assumes that these quantities are sufficiently stable and that the time value of money, retention changes, returns, and service costs are either immaterial or handled elsewhere.

A more rigorous discounted model is:

CLV = ∑t=1T [(Rt − Ct) × Pt] ÷ (1 + d)t − CAC

where Rt is revenue from a customer in period t, Ct is variable cost in that period, Pt is the probability the customer remains active, d is the discount rate per period, and T is the planning horizon. The model requires assumptions about retention, margin, timing, and future behaviour; it should be treated as an estimate rather than a fact.

2.5 Profitability KPIs

Revenue is the amount generated by sales before or after specified deductions; the definition must be explicit. Contribution margin focuses on the amount available to cover fixed costs and profit:

Contribution ext{ margin} = Net ext{ revenue} − Variable ext{ costs}

Variable costs may include product cost, payment fees, picking and packing, delivery subsidies, returns, customer-service costs, and discounts. Contribution-margin percentage is:

Contribution ext{ margin rate} = Contribution ext{ margin} ÷ Net ext{ revenue} × 100

Profitability analysis should be conducted by product, customer segment, channel, order, and cohort where possible. A channel may appear attractive on revenue but be unprofitable after returns and fulfilment costs.

2.6 Operational KPIs

Operational performance affects both cost and customer experience. Relevant indicators include:

  • order-cycle time;
  • on-time shipment and delivery rate;
  • fulfilment accuracy;
  • stock-out rate;
  • cancellation rate;
  • return rate;
  • payment-decline rate;
  • customer-service response and resolution time;
  • warehouse picking productivity.

Operational metrics should be connected to customer and financial outcomes. Reducing delivery cost may increase late deliveries and refunds; reducing inventory may increase stock-outs and lost sales.

3. Segmentation, Cohorts, and Diagnostic Analysis

Segmentation divides a population into meaningful groups. Useful dimensions include geography, device, acquisition source, product category, new versus returning status, order value, customer tenure, and predicted propensity. Segments should be selected because they support a decision, not because an analytics platform can produce them.

A segment comparison should consider both scale and rate. A small segment with a high conversion rate may contribute fewer orders than a large segment with a moderate rate. Analysts should also avoid confusing correlation with causation. Mobile users may convert less because the experience is difficult, or because mobile users differ in intent, location, or purchase context.

Cohort analysis groups customers by a common starting date or event. For example, a January acquisition cohort can be compared with February and March cohorts using retention, contribution margin, and return rate. Cohorts are especially valuable for assessing marketing quality because they connect acquisition activity to later behaviour.

A practical diagnostic sequence is:

  1. Confirm that the aggregate change is real and not caused by tracking loss.
  2. Compare the metric across time, device, channel, product, geography, and customer status.
  3. Locate the first funnel stage where performance diverges.
  4. Inspect operational and technical causes.
  5. Form hypotheses and test them rather than selecting the most convenient explanation.

4. Dashboards and Evidence Communication

A dashboard should answer a defined set of questions for a defined audience. An executive dashboard may contain revenue, contribution margin, orders, new customers, retention, and fulfilment risk. A product dashboard may emphasise search success, product views, add-to-cart rate, checkout errors, and experiment results.

Effective dashboards:

  • display trends and comparisons, not isolated numbers;
  • state definitions, time zones, filters, and data freshness;
  • distinguish actuals, targets, forecasts, and benchmarks;
  • show absolute values alongside percentages;
  • use appropriate visual scales;
  • provide drill-down paths to diagnose changes;
  • identify metric owners and required actions.

A dashboard can create false confidence when it contains too many metrics. Vanity metrics, such as impressions without qualified traffic or revenue without margin, may encourage activity without value. A metric hierarchy is useful: a primary outcome, supporting drivers, and diagnostic measures. For example, contribution margin may be supported by orders, AOV, conversion rate, discount rate, return rate, and fulfilment cost.

5. Experimentation and A/B Testing

A/B testing compares a control version with one or more treatment versions under controlled allocation. The objective is to estimate the causal effect of a change, such as a redesigned checkout page.

A basic design includes:

  • a clear hypothesis;
  • a defined eligible population;
  • random assignment to control and treatment;
  • a primary outcome metric;
  • guardrail metrics, such as cancellation or latency;
  • a planned duration or sample size;
  • a pre-specified analysis method.

Randomisation helps balance observed and unobserved characteristics on average. It does not guarantee perfect balance in a small sample. Assignment must occur before the outcome and users should not switch unpredictably between variants.

For binary conversion, the observed rate in group i is:

pi = xi ÷ ni

where xi is the number of conversions and ni is the number of eligible observations in group i. The absolute difference is pB − pA. Relative lift is:

Relative ext{ lift} = (pB − pA) ÷ pA × 100

For example, if control conversion is 4.0% and treatment conversion is 4.6%, absolute lift is 0.6 percentage points and relative lift is 15%. These are different statements and both should be reported.

Statistical significance is not the same as business significance. A tiny improvement may be statistically detectable with a very large sample but not justify implementation costs. Conversely, a practically valuable result may be uncertain because the sample is small. Analysts should report effect size, uncertainty, sample size, test duration, and business impact.

Common threats include peeking at results and stopping when a preferred outcome appears, testing many metrics until one is significant, novelty effects, seasonality, interference between users, and sample-ratio mismatch. Tests should normally run through relevant purchasing cycles and should not be repeatedly restarted without a valid design.

6. Data Quality, Bias, and Governance

Analytics is only as reliable as its measurement system. Important data-quality dimensions include:

  • Accuracy: does the value represent reality?
  • Completeness: are required events and fields present?
  • Consistency: do systems use compatible definitions?
  • Timeliness: is data available when decisions require it?
  • Uniqueness: are orders or users duplicated?
  • Validity: does the value conform to permitted formats and ranges?

Typical e-commerce failures include double-counted purchases after page refresh, blocked cookies, ad blockers, cross-device identity errors, missing refunds, timezone mismatches, bot traffic, failed server events, and changes to tagging. A sudden conversion increase may actually be a tracking defect.

Bias can enter through the population observed, the data collected, the labels used, and the decision process. For example, a recommendation model trained on past purchases may under-recommend products to new customers; a retention model may treat customers with missing identifiers as inactive; an advertising algorithm may optimise toward cheap conversions while excluding less easily measured customers.

Privacy and governance require purpose limitation, data minimisation, access controls, retention policies, security, and lawful processing. Consent requirements vary by jurisdiction and data category. Analysts should avoid collecting sensitive data unnecessarily and should document definitions, transformations, model assumptions, and access permissions. Personalisation should not become discriminatory pricing or manipulative design. Automated decisions affecting customers should be explainable enough for responsible review, and high-impact decisions require human oversight.

7. Applied Case: Improving Checkout Performance

The following is an illustrative case.

Background

Northstar Home, an online retailer, experiences strong traffic growth but no corresponding growth in completed orders. Management believes that a shorter checkout will solve the problem.

Problem

The analytics team must determine whether checkout design is the main constraint and whether a redesign improves profitable orders without increasing fraud, cancellations, or returns.

Analysis

The team first validates event tracking against payment and order databases. It finds that mobile payment-failure events were under-recorded, so the apparent checkout decline is partly a measurement problem. After correction, the funnel for one month is:

StageCount
Sessions100,000
Product views42,000
Add to cart12,600
Checkout started7,560
Orders5,670

The session-to-order conversion is 5.67%. Checkout completion is 5,670 ÷ 7,560 = 75%. Mobile checkout completion is 68%, compared with 84% for desktop. Payment declines and address-entry errors are concentrated on mobile devices.

Approach and solution

The team defines the hypothesis: replacing multi-page mobile checkout with a single-page flow and clearer payment-error messages will increase completed orders. The primary metric is completed-order conversion among eligible mobile checkout users. Guardrails are payment-fraud rate, cancellation rate, page latency, and contribution margin per session.

Users are randomly assigned to the existing checkout or the new checkout. The test is run across complete weekly cycles, and the team avoids changing the design during the test. Results are segmented by new and returning customers but the primary decision remains based on the pre-specified metric.

The treatment improves checkout completion, but its initial revenue lift is partly offset by a higher cancellation rate caused by an address-validation defect. After fixing the defect, a second controlled test shows a durable improvement in completed orders and contribution margin without a material increase in fraud.

Outcome

Northstar deploys the new checkout gradually, monitors operational metrics, and continues to review payment failures by device and provider. The decision is based not on conversion alone but on the combination of validated measurement, causal testing, and profitability guardrails.

Learning points

  1. Measurement validation must precede interpretation.
  2. Funnel analysis identifies where to investigate but does not prove the cause.
  3. A/B tests require a primary metric and guardrails.
  4. Conversion improvement is not necessarily business improvement.
  5. Operational and financial outcomes should be monitored after rollout.

8. Contemporary Uses of Technology and AI

Modern analytics platforms can process event streams, identity graphs, warehouse data, and machine-learning outputs. AI may support demand forecasting, anomaly detection, product recommendations, customer-service analysis, and customer-value prediction. These applications are useful when the underlying data is reliable and the decision process is governed.

Forecasts should be evaluated against appropriate baselines and monitored for drift. A complex model is not automatically better than a transparent rule. Recommendation systems can reinforce popularity bias, while automated marketing can over-target customers who would have purchased without intervention. Human review, fairness checks, privacy controls, and continuous validation remain necessary.

Best-Practice Checklist

Before approving an analytics-based decision, ask:

  • Is the business question explicit?
  • Are metric definitions and denominators documented?
  • Has data quality been checked against an independent source?
  • Are results shown by relevant segments and cohorts?
  • Is the difference practically important, not merely statistically significant?
  • Have costs, margin, returns, and operational effects been included?
  • Could attribution, selection, or survivorship bias explain the result?
  • Are privacy, security, fairness, and access requirements satisfied?
  • Is there an owner and a post-decision monitoring plan?

Chapter Summary

E-commerce analytics transforms behavioural and operational data into decisions about acquisition, conversion, retention, profitability, and service delivery. Strong analysis begins with precise KPI definitions and consistent denominators. Funnels locate performance changes; segmentation and cohorts reveal differences across customers, channels, and time. Dashboards communicate trends and drivers, while experimentation provides stronger evidence about causal effects than observational comparisons. A/B tests require randomisation, pre-specified outcomes, suitable duration, effect-size interpretation, and guardrail monitoring. Revenue and conversion must be interpreted alongside contribution margin, returns, fulfilment, and customer value. Finally, data quality, attribution uncertainty, privacy, fairness, and bias determine whether an apparently precise result is trustworthy. Evidence-based decision making is therefore both a technical and managerial discipline.

Key Terms

KPI: A metric linked to an objective and decision.

Conversion rate: The proportion of a defined population completing a specified outcome.

Funnel: A sequence of stages through which users or orders progress.

AOV: Average order value, calculated as revenue divided by completed orders.

CAC: Customer acquisition cost per newly acquired customer.

ROAS: Attributed revenue divided by advertising spend.

Attribution: Assignment of credit for an outcome to marketing interactions.

Incrementality: The additional outcome caused by an intervention.

Retention: Continued activity or purchasing by customers over time.

Cohort: A group sharing a starting event or time period.

CLV: Estimated future customer contribution value, usually adjusted for costs and retention.

Contribution margin: Net revenue minus specified variable costs.

Segmentation: Division of a population into analytically meaningful groups.

Dashboard: A structured visual display of metrics for monitoring and decisions.

A/B test: A randomised comparison of control and treatment versions.

Guardrail metric: A measure monitored to prevent harmful side effects.

Data quality: The degree to which data is accurate, complete, consistent, timely, unique, and valid.

Selection bias: Systematic distortion caused by who is included or excluded from analysis.

Sample-ratio mismatch: A departure from the planned allocation between experiment groups.

Review Questions

Short Answer Questions

  1. What distinguishes a KPI from an ordinary metric?
  2. Why can revenue growth occur without profit growth?
  3. What is the purpose of cohort analysis?
  4. State two guardrail metrics for a checkout experiment.
  5. Why is last-click attribution not necessarily causal evidence?

Long Answer Questions

  1. Explain how traffic, funnel, retention, and profitability KPIs should be connected in an e-commerce dashboard.
  2. Describe the design requirements of a valid A/B test and discuss three threats to its validity.
  3. Compare descriptive, diagnostic, predictive, and prescriptive analytics using e-commerce examples.
  4. Explain how data-quality failures can lead to incorrect managerial decisions.
  5. Discuss ethical and governance issues in AI-supported e-commerce personalisation.

Analytical / Application Questions

  1. An online store has 50,000 sessions, 10,000 product views, 2,000 cart additions, 1,000 checkouts, and 800 orders. Calculate each stage conversion rate and overall session-to-order conversion. Identify the largest proportional loss and propose two hypotheses to investigate.
  2. A treatment page produces 460 orders from 10,000 users, while control produces 400 orders from 10,000 users. Calculate both conversion rates, absolute lift, and relative lift. Explain why the business should also examine margin and guardrail metrics.
  3. A paid channel reports a ROAS of 2.5, but product cost equals 45% of revenue, fulfilment and payment cost equals 20%, discounts equal 10%, and advertising spend equals 40% of attributed revenue. Determine whether the channel produces positive contribution after these listed costs, and state one limitation of the calculation.

Multiple Choice Questions with Answers

Question 1

Which metric most directly measures the proportion of checkout starts that become completed orders?

A. Checkout completion rate

B. Customer acquisition cost

C. Average order value

D. Repeat-purchase rate

Correct Answer: A. Checkout completion rate

Question 2

A store records 300 orders from 12,000 sessions. What is its session-to-order conversion rate?

A. 0.25%

B. 2.5%

C. 4.0%

D. 25%

Correct Answer: B. 2.5%

Question 3

Which method provides the strongest evidence that a marketing intervention caused additional orders?

A. Last-click attribution

B. A simple traffic comparison

C. A randomised holdout experiment

D. A dashboard trend

Correct Answer: C. A randomised holdout experiment

Question 4

What is the principal purpose of cohort analysis?

A. To remove all customer identifiers

B. To compare groups sharing a starting event over time

C. To calculate advertising impressions only

D. To replace operational metrics

Correct Answer: B. To compare groups sharing a starting event over time

Question 5

If control conversion is 4.0% and treatment conversion is 4.6%, what is the relative lift?

A. 0.6%

B. 4.6%

C. 15%

D. 60%

Correct Answer: C. 15%

Question 6

Which item is a guardrail metric in a checkout experiment?

A. The pre-written hypothesis

B. Fraud rate

C. The experiment name

D. The page title

Correct Answer: B. Fraud rate

Question 7

Why should ROAS not be treated as profit?

A. ROAS excludes all revenue

B. ROAS measures only repeat customers

C. ROAS does not automatically include product, fulfilment, return, and other costs

D. ROAS is always calculated from profit

Correct Answer: C. ROAS does not automatically include product, fulfilment, return, and other costs

Question 8

Which problem is a data-quality issue?

A. A documented KPI owner

B. Duplicate purchase events after page refresh

C. A pre-specified experiment metric

D. A meaningful customer segment

Correct Answer: B. Duplicate purchase events after page refresh

Question 9

What does contribution margin generally represent?

A. Net revenue minus specified variable costs

B. Sessions divided by users

C. Advertising spend divided by impressions

D. Orders divided by product views

Correct Answer: A. Net revenue minus specified variable costs

Question 10

Which practice reduces the risk of misleading A/B-test conclusions?

A. Stopping whenever an early result is favourable

B. Changing the primary metric after viewing results

C. Pre-specifying the primary outcome and monitoring guardrails

D. Assigning users to variants according to purchase value

Correct Answer: C. Pre-specifying the primary outcome and monitoring guardrails

E-Commerce
Chapter 11 of 15