Understanding market basket analysis for e-commerce
Market basket analysis uncovers which products customers buy together. These insights inform bundle pricing, cross-selling strategies, and promotional planning for higher average order values.
What is market basket analysis?
Market basket analysis is a data mining technique that identifies products frequently purchased together by analyzing transaction-level sales data. The classic retail example is discovering that customers who buy bread often buy butter, but in e-commerce the associations can be far more complex and valuable. These product relationships inform bundle pricing, product page recommendations, cross-sell strategies, and promotional combinations that increase average order value. Modern MBA algorithms go beyond simple co-occurrence to measure association strength through metrics like support, confidence, and lift, which quantify how much more likely products are to be purchased together than independently. For e-commerce businesses, understanding these purchase patterns creates pricing opportunities that single-product analysis misses entirely.
Key metrics: support, confidence, and lift
Three core metrics drive market basket analysis. Support measures how frequently a product combination appears in all transactions, indicating its overall prevalence. Confidence measures the likelihood that a customer who buys product A will also buy product B, revealing directional association strength. Lift compares the observed co-purchase rate to what you would expect if purchases were independent, with values above 1.0 indicating a meaningful association. Focus your pricing strategy on product pairs with high lift values, as these represent genuine purchase relationships rather than coincidental co-occurrence. For most e-commerce catalogs, setting minimum thresholds of 0.5 percent support, 20 percent confidence, and 1.5 lift filters out noise and surfaces actionable product relationships.
- Support: frequency of the combination across all transactions
- Confidence: probability of buying B given purchase of A
- Lift: association strength relative to independent purchase rates
- Focus on high-lift pairs for pricing strategy decisions
Applying basket analysis to pricing strategy
Products commonly bought together have interdependent demand, creating pricing leverage that single-product analysis misses. Pricing one product as a loss leader can drive sales of its complementary products, where you optimize for margin. Use basket analysis to identify which products to use as traffic drivers and which to pair for margin capture. For example, if printers and ink cartridges are strongly associated, competitive pricing on printers drives basket-level profitability through high-margin ink sales. Similarly, competitive pricing on gaming consoles drives accessory and game purchases where margins are stronger. The key insight is optimizing total basket margin rather than individual product margin.
- Identify loss-leader candidates that drive basket growth
- Price complementary products for margin optimization
- Create bundle pricing based on frequently co-purchased items
- Optimize total basket margin rather than individual product margins
Cross-sell strategies informed by basket data
Beyond pricing, market basket analysis directly informs cross-selling strategies that increase average order value. Display frequently co-purchased products on product pages with messaging like customers also bought to leverage proven purchase patterns. Time promotional emails around basket associations, offering discounts on complementary products after a customer purchases an anchor item. Structure your product page layouts to reduce friction between associated products, placing them visually close and enabling one-click add-to-cart. When combined with competitive pricing data from ShoppingScraper, you can ensure your cross-sell recommendations feature products where you offer competitive value, maximizing the likelihood that customers complete the full basket with you rather than splitting purchases across competitors.
Combining with competitor pricing data
Use ShoppingScraper's data to see how competitors price products within the same basket. If you are competitive on the anchor product but competitors are cheaper on complementary items, you risk losing the entire basket as savvy shoppers mix and match across retailers. Monitor pricing across product associations, not just individual SKUs. When a competitor undercuts you on a high-lift complementary product, the impact on your business may be larger than the individual product revenue suggests because it threatens the entire associated basket. Build competitive monitoring views organized by basket associations so your pricing team can evaluate competitiveness at the basket level and prioritize pricing responses that protect your highest-value product combinations.
Implementation: from data to action
Start with your transaction data to identify associations with strong support and confidence metrics. Most e-commerce platforms export order-level data that can be analyzed using open-source tools like Python's mlxtend library or commercial analytics platforms. Validate findings with domain knowledge to filter out spurious associations. Test pricing changes on identified baskets in a controlled manner using A/B testing before rolling out catalog-wide. Refresh your basket analysis quarterly as purchase patterns shift with seasons, promotions, and assortment changes. Track average order value and items per order as primary success metrics, expecting 5 to 15 percent improvement in average order value when basket-informed pricing and cross-selling are implemented effectively.
CEO & Co-founder
E-commerce pricing expert with 5+ years building data infrastructure for retailers and brands. Co-founded ShoppingScraper to make competitive pricing intelligence accessible to every e-commerce business.