liveBook · Manning

Conversion

As explained in The Well-Grounded Data Analyst

A conversion rate is the percentage of opportunities or interactions that result in a desired outcome, such as a product purchase after cart placement.

Conversion measures how often an opportunity becomes a desired outcome. For product analysis, a practical definition is the percentage of cart events that become purchase events within a period: purchases divided by cart events. The definition must be agreed before analysis, because different teams may interpret both the opportunity and the outcome differently. section 4.0 section 4.4.2

At product level, conversion can complement sales volume, revenue, popularity, and month-on-month change when deciding what performed best. It emphasizes products that shoppers are less likely to abandon after adding them to a cart, but high conversion does not by itself establish overall business performance. section 4.2.1 section 4.3

Calculate and use conversion with explicit choices:

  • Count purchase events as the numerator and cart events as the denominator for each product and period. section 4.4.2
  • Decide whether repeated cart additions represent separate opportunities or should be deduplicated; that decision changes the rate. section 4.4.2
  • Keep November and December separate when the question concerns seasonal or month-on-month performance. section 4.4.2
  • Inspect implausible values before ranking products. Rates above 100% may reveal missing cart events, data errors, or a purchase path that bypasses the cart. section 4.4.3
  • Set minimum user and purchase thresholds before naming top converters, so a small number of events does not dominate the ranking. section 4.4.3

December conversion ranking

A December histogram shows many products near 30% conversion, alongside values at or above 100%. Inspecting one extreme case finds three purchases by one user but only one cart event. Rather than treating the rate as automatically meaningful, exclude invalid or unexplained values, retain products within 70%–100% conversion, and require minimum users and purchases before examining their categories. section 4.4.3

conversion_table = (
    pd.pivot_table(
        data=events.assign(month=events["event_time"].dt.month),
        index=["product_id", "product_name"],
        columns=["month", "event_type"],
        values="user_session",
        aggfunc="count"
    )
    .fillna(0)
    .set_axis(labels=["november_cart", "november_sold",
 "december_cart", "december_sold"],
              axis=1)
    .reset_index()
    .assign(november_conversion
 = lambda x: x["november_sold"] / x["november_cart"],
            december_conversion
 = lambda x: x["december_sold"] / x["december_cart"])
)

conversion_table.head()

A pivoted product table counts cart and purchase events by month, then divides purchases by carts to produce November and December conversion rates. section 4.4.2

How The Well-Grounded Data Analyst covers it

How deep it goes
Works through product-level event aggregation, denominator choices, anomaly investigation, and ranking cutoffs rather than treating the rate as self-validating.
Examples
Uses shopping cart and purchase events, a December conversion histogram, and a repeated-purchase case with one cart event.
What it assumes
Assumes access to timestamped product event data containing cart and purchase event types.
What you can do after
Evaluate/understand conversion rankings by calculating cart-to-purchase rates, checking implausible values, and applying eligibility thresholds.
How it connects
Connects conversion to sales volume, revenue, popularity, product rankings, event data, and month-on-month comparison.

Also explained in

Compare how 5 books explain conversion →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Well-Grounded Data Analyst. The section links point to the parts of the book it draws on.