Sign in

Blog · Board and management reporting · Consumer goods

Shopper analytics: measure baskets and repeat purchases

Shopper analytics uses deidentified transaction exports to compare basket composition and repeat buying. Work through basket values, category attachment, and repeat-purchase rates while keeping the observation window and customer coverage clear.

The short answerShopper analytics measures basket composition, spending, and repeat buying from transaction records. Use distinct basket IDs, consistent product categories, and approved deidentified shopper tokens to compare segments over a stated period. Calculate basket measures from orders and repeat-purchase measures from distinct identified shoppers, then reconcile sales, units, and counts before explaining differences or changing an assortment.

Shopper analytics measures what goes into a basket, how much an order is worth, and which identified shoppers buy again within a stated period. A deidentified transaction export can answer those questions without adding names, contact information, or new observation of shoppers.

The useful unit changes with the question. Basket composition is measured per transaction. Repeat buying is measured per distinct shopper. Mixing those denominators can make the same file tell conflicting stories.

Start with the supplied transaction records

Use basket ID, transaction date, SKU or category, units, net merchandise sales, store or channel, and an approved shopper token where one exists. Keep the line-level file for checking product totals, then create one basket summary per transaction for order measures.

Net sales should follow one consistent treatment of returns, discounts, and sales tax. The Census Bureau's retail sales definition deducts refunds and allowances and excludes sales taxes collected directly for tax agencies. Document your file's basis before comparing baskets from different sources.

Use only fields needed for the agreed review. A stable token supports repeat counts; it is not proof that the record is anonymous. NIST's review of deidentification explains that deidentified data can sometimes be reidentified. Have the data owner approve the supplied export and keep direct identifiers out of this analysis.

If the business has no consistent shopper token, basket analysis still works. Repeat-shopper analysis does not. Do not create inferred identities from similar order contents or assume all unidentified purchases belong to a single shopper.

Compare segments with the same observation window

Choose the segment before reading the result. Use an existing commercial grouping, a prior-period buying pattern, or another documented rule relevant to the question. If the grouping comes from the current basket itself, acknowledge that a difference in basket size may follow directly from that definition.

The fictional US grocery example below uses preassigned Stock-up and Top-up segments. These labels were established before the review window and stay fixed throughout October 2026. All transactions are completed purchases; there are no returns. Each product count is a unit, not a separate order.

Basket Shopper token Segment Transaction date Cereal units Milk units Bread units Total units Net sales (USD)
T01 S01 Stock-up October 1, 2026 2 1 0 3 18
T02 S02 Top-up October 2, 2026 0 1 1 2 9
T03 S03 Stock-up October 3, 2026 1 0 1 2 11
T04 S01 Stock-up October 10, 2026 1 1 1 3 15
T05 S04 Top-up October 11, 2026 0 2 0 2 8
T06 S02 Top-up October 20, 2026 0 1 1 2 9
T07 S05 Stock-up October 5, 2026 2 0 2 4 22
T08 S06 Top-up October 6, 2026 0 0 1 1 5

The category columns make the contents visible. Net sales are supplied transaction amounts after the agreed adjustments; category-specific prices are not needed for these basket counts.

Measure basket value and size

Average basket value = Net basket sales / Distinct baskets

Units per basket = Units sold / Distinct baskets

Count each basket once even if its source export contains many item rows. The average order value page covers the spending measure in more detail.

Segment Baskets Net sales (USD) Units Average basket value (USD) Units per basket
Stock-up 4 66 12 16.50 3.00
Top-up 4 31 7 7.75 1.75
Total 8 97 19 12.13 2.38

Stock-up sales are 18 + 11 + 15 + 22 = $66, so basket value is 66 / 4 = $16.50. Top-up sales are 9 + 8 + 9 + 5 = $31, and 31 / 4 = $7.75. Total basket value is 97 / 8 = $12.13, rounded to cents; units per basket are 19 / 8 = 2.38, rounded to two decimals.

The sales proof is 66 + 31 = $97. The count proof is 4 + 4 = 8 baskets, and the unit proof is 12 + 7 = 19. Match those totals to the line-level export before interpreting a segment difference.

Check basket pairings against the base frequency

Product presence is a yes-or-no flag within each basket. Buying multiple units of cereal does not make that transaction multiple cereal baskets.

Measure Baskets from the transaction table Count
Contains cereal T01, T03, T04, T07 4
Contains milk T01, T02, T04, T05, T06 5
Contains both T01, T04 2
All baskets T01 through T08 8

Cereal-to-milk attachment is 2 / 4 = 50.0%. But milk appears in 5 / 8 = 62.5% of all baskets. The pairing's lift is 50.0% / 62.5% = 0.80. Both products appear together in 2 / 8 = 25.0% of baskets.

In this small illustration, milk is less common in cereal baskets than across the full file. The visible pairing alone therefore does not support calling it an unusually strong association. It also does not establish whether one purchase causes another. Use cross-sell discount basket profit for the separate question of whether a proposed offer earns enough contribution.

Measure repeat buying from shoppers

In-window repeat purchase rate = Shoppers with multiple qualifying baskets / Distinct identified shoppers

Segment Distinct shoppers Repeat shoppers Evidence Repeat purchase rate
Stock-up 3 1 S01 has T01 and T04 33.3%
Top-up 3 1 S02 has T02 and T06 33.3%
Total 6 2 S01 and S02 repeat 33.3%

Each segment's rate is 1 / 3 = 33.3%; the total is 2 / 6 = 33.3%, rounded to one decimal place. Stock-up has higher basket value in this file but the same observed repeat rate. Those are different findings and can lead to different actions.

A shopper entering near the period end has less time to repeat. For a retention review, follow a starting cohort for an equal subsequent window instead of treating this in-window rate as retention. Use omnichannel analytics when the same approved tokens span store and online orders.

Decide what the evidence supports

The category or shopper-insights manager owns the comparison and its segment definitions. Merchandising owns assortment actions; finance checks spending and profit measures; the data owner confirms token coverage. A CPG brand receiving only part of a retailer's transaction history should label the result as behavior observed in that supplied coverage.

The example suggests reviewing basket mix rather than assuming Stock-up shoppers are more likely to return. It does not justify expanding the cereal-and-milk promotion without a separate commercial test. Keep the proposed action tied to the measure that actually changed.

Where it goes wrong

  • Item rows counted as baskets. Larger orders inflate order counts and reduce reported average spending.
  • Unit quantities counted as category presence. Pairing rates become volume measures with the wrong denominator.
  • Unidentified baskets treated as shoppers. Repeat rates lose a defensible customer population.
  • Current spending used to explain spending segments. The grouping itself may create the observed result.
  • A short window called loyalty. Purchase timing and incomplete coverage limit what repeat counts mean.

Analyze your own transaction export in Covirage

Bring a sample of your own approved deidentified transaction export with basket IDs, product categories, segment rules, and existing shopper tokens. Covirage maps the columns, and its tools compute and check basket and repeat-purchase measures; the external AI model explains the comparisons with every figure traced to its rows. Create a free Covirage account and set up your business to work from your own file.

See Covirage for CPG brands for the supporting industry review.

Questions people ask

Can you analyze shoppers without names or email addresses?

Yes. Basket composition needs transaction and product identifiers, while repeat buying needs a stable approved shopper token. Names, email addresses, and payment details are not needed for these calculations. Tokenized records still require appropriate handling because removing direct identifiers does not guarantee anonymity.

What is the difference between shopper and customer analytics?

Shopper analytics often concentrates on purchase occasions, basket mix, and repeat shopping. Customer analytics can cover a broader commercial relationship, including service history or account profitability. Define the business question and available transaction coverage rather than relying on the label.

How do you measure repeat purchases in a transaction export?

Count distinct qualifying baskets for each identified shopper within the stated window. Divide shoppers with multiple qualifying purchases by all distinct identified shoppers in that window. A return event is not a new purchase, and unidentified baskets do not belong in that shopper denominator.

Does buying two products together prove a cross-sell opportunity?

It identifies an observed pairing worth investigating. Common products can appear together frequently even without a strong association. Compare the pairing with each product's overall basket frequency, and test any proposed promotion before treating the relationship as incremental demand.