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




