A family beside grocery displays in a store.

Basket Analysis: how retail media finds hidden purchase patterns

A basket can tell you that pasta and tomato sauce appear together. It cannot tell you, by itself, whether an ad for sauce will sell more pasta, whether shoppers bought both for the same meal, or whether a promotion created the pattern.

A woman with store displays in the background.

That distinction is the starting point for useful basket analysis.

Basket analysis examines products or categories that occur in the same transaction. It goes beyond basket composition, which describes what is present, by testing whether relationships recur across many baskets. Retail media teams can use those patterns to form cross-sell, audience and placement hypotheses. The method does not explain why a relationship exists.

The practical job is to move from a pattern to a decision without pretending that association is causation.

What basket analysis actually measures

The basic dataset has a transaction identifier and the items attached to it. In grocery, a transaction may be one checkout basket. In ecommerce, it might be one completed order. For a retailer with mixed fulfillment, the team must decide whether split shipments, canceled lines, returns and substitutions belong to the original basket.

That choice matters. If the transaction definition changes, the pattern can change too.

Association rules usually take a form such as:

Example association rule

Shoppers who bought product A also bought product B.

Three measures help teams judge the rule. These definitions follow established association-rule literature as well as the IBM documentation used below.[1][2][5]

Support is the share or count of transactions containing the item set. A rule with low support may be real but too rare to fund.

Confidence is the share of A baskets that also contain B. It answers a directional question: when A occurs, how often does B occur?

Lift compares that confidence with B's normal incidence. A high confidence can be unimpressive when B appears in almost every basket. Lift corrects for the base rate by asking whether A and B occur together more often than independence would predict. IBM's association-rule documentation defines these measures and shows why transaction structure and threshold choices shape the resulting rule set.[1][2]

A useful analyst reads the three together:

Core formulas

  • Support(A and B) = baskets containing A and B / all baskets
  • Confidence(A → B) = baskets containing A and B / baskets containing A
  • Lift(A → B) = confidence(A → B) / share of all baskets containing B

Support indicates scale. Confidence describes conditional frequency. Lift indicates whether the relationship adds information beyond the popularity of the second item.

Start with the decision, not the algorithm

A market-basket tool can produce thousands of rules. Most are not campaign ideas.

Before running the analysis, name the decision:

  • Which products could support a cross-sell campaign?
  • Which category can provide a relevant audience for a launch?
  • Which missing item may signal an incomplete mission?
  • Which product adjacency deserves an in-store test?
  • Which promoted SKU creates a wider category halo?

The decision determines the unit of analysis. A brand-level question may require SKU normalization. A meal-solution question may need category and occasion groupings. A store-media question may need store-level availability and zone data. A repeat-purchase question may require shopper-linked baskets over time rather than isolated transactions.

Thresholds should also follow the use case. IBM's worked examples show how minimum support, confidence and lift reduce the volume of generated rules.[3] The point is not to find one universal threshold. The point is to avoid a rule set so large that every coincidence looks actionable.

A worked retail media example

Consider a hypothetical analysis of 10,000 baskets for a retailer that wants to grow a premium pasta sauce.

Example basket counts

  • All baskets: 10,000 (100%)
  • Baskets with premium sauce: 500 (5%)
  • Baskets with fresh filled pasta: 800 (8%)
  • Baskets with both: 100 (1%)

The rule premium sauce → filled pasta has 1% support (100 / 10,000), 20% confidence (100 / 500) and 2.5 lift (20% / 8%). Sauce buyers were therefore 2.5 times as likely to buy filled pasta as the average basket in this illustrative dataset.

The arithmetic makes the rule reproducible, not automatically actionable. The team still needs to check whether the pair survives changes in week, store format, promotion and joint availability. It also needs a commercial threshold: 100 joint baskets may support a small test but not a national campaign.

That rule can support several tests:

  1. Use filled-pasta buyers as an audience for the sauce, but use a holdout group to estimate incremental attachment.
  2. Test a joint onsite module when both products are available.
  3. Place the sauce creative near a meal-solution zone in selected stores.
  4. Measure sauce conversion, attachment to the paired item, total category sales and substitution from other sauces.

The analysis does not prove that any treatment will work. It creates better hypotheses than a generic category-buyers audience.

The checks that prevent bad rules

Check product availability

A product cannot appear in a basket when it was unavailable. Check whether a weak association coincides with distribution gaps, or whether a sudden association begins when one product returns to stock. Product availability belongs in the diagnosis.

Use store-SKU availability for the same period as the transactions. If that data is incomplete, state the limitation.

Check promotions and price

Two items may occur together because they were included in the same offer. A price cut can also bring a different shopper mix into the category. Compare promoted and non-promoted periods before treating the relationship as durable.

Check store and channel mix

Check whether a pooled rule is driven by a small group of large stores, a delivery-only assortment or one region. Re-run the pattern by store format, region and channel where sample size allows.

Check time stability

A holiday rule is not automatically an evergreen rule. Examine several periods and keep seasonality visible. Stability does not mean the numbers must be identical; it means the commercial interpretation survives reasonable changes in time window.

Check direction and base rates

A to B is not the same as B to A. Coffee may appear in many pastry baskets while pastries appear in few coffee baskets. The media action depends on which product supplies reach and which product is the intended response.

Check whether the rule can be activated

A statistically interesting pattern may fail commercially because the audience is too small, the products are rarely available together, the margin cannot support the media cost, or the retailer cannot target at the required level.

From association to activation

The guidance below turns a validated rule into a test design, not a guaranteed campaign response. Commercial interpretation belongs to related basket influence analysis.

Activation options

  • Audience creation: use a recent purchase of A with a cadence-based lookback; show B to eligible A buyers and suppress recent B buyers when acquisition is the goal; require incremental B purchase versus a holdout.
  • Cross-sell placement: require A in the open basket and B to be available; present B while the basket remains open; require incremental attachment, not clicks alone.
  • In-store adjacency: require a stable A-B rule, sufficient zone traffic and joint availability; test a paired message or candidate zone; require store-level lift with a credible control.
  • Measurement diagnosis: use exposure and transaction data at the same product grain; compare attachment, breadth or composition; report the descriptive result and use a counterfactual for causal impact.

The IAB/MRC retail media guidelines emphasize transparent data sources, definitions and methods across media environments.[4] For basket analysis, that means reporting the transaction definition, product hierarchy, analysis period, eligibility rules, exclusions and comparison method.

Common mistakes

Treating confidence as enough. Popular products create high-confidence rules even when the first item adds little information.

Mining at raw SKU level only. Pack-size and flavor fragmentation can hide a category relationship or create duplicate rules.

Using one pooled national model. Local assortment and store format can produce different patterns.

Turning every association into a bundle. Some products co-occur but do not belong in the same message, offer or moment.

Claiming shopper intent from one basket. A transaction records an outcome under specific conditions. It does not reveal the full motive.

Calling attributed attachment incremental. More paired sales among exposed shoppers can result from audience selection rather than media.

A buyer checklist

Before approving a basket-based campaign, ask:

  • What counts as one transaction?
  • Are returns, substitutions and canceled items handled consistently?
  • At what product hierarchy is the rule calculated?
  • What are the support, confidence and lift values?
  • Does the rule persist across periods, stores and channels?
  • Were price, promotion and availability checked?
  • Is the audience or placement large enough to activate?
  • What treatment will test the hypothesis?
  • What counterfactual will estimate incrementality?

FAQ

Is basket analysis the same as basket composition?

No. Basket composition describes what is in a basket. Basket analysis is the method used to identify and evaluate recurring relationships across many baskets.

Does high lift prove that one product causes the other purchase?

No. Lift shows an association relative to base rates. Shared missions, promotions, assortment and shopper characteristics may explain the relationship.

Should teams use SKU or category data?

Use the level that matches the decision. SKU analysis can support a product placement; category analysis can reveal broader missions. Many projects need both.

Can basket analysis find substitution?

It can flag negative or changing relationships, but substitution requires careful availability, price and longitudinal analysis. Absence from the same basket is not enough.

What is the best success metric?

Choose the metric tied to the campaign job: incremental attachment, first purchase, category breadth, total basket value or incremental sales. Do not use one metric for every rule.

Bottom line

Basket analysis is a pattern-finding tool. Its value comes from disciplined interpretation.

Define the transaction correctly. Read support, confidence and lift together. Check price, promotion, availability and store mix. Then turn a small number of stable associations into controlled campaign tests.

That is how a hidden purchase pattern becomes a retail media decision rather than a chart in an insights deck.

Sources

[1] IBM, *Usage of association rules*.

[2] IBM, *Lift in an association rule*.

[3] IBM, *Examples for creating association rules*.

[4] IAB and Media Rating Council, *Retail Media Measurement Guidelines*.

[5] Agrawal, Imieliński and Swami, *Mining Association Rules between Sets of Items in Large Databases*.

Ready to see how this works in practice?

Footprints AI helps brands and retailers measure what matters. See our customer success stories or get in touch to discuss your retail media strategy.

More Stories

By clicking “Accept All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.