Articles

Recommendation systems for retail

Building a recommendation engine from scratch on Google's own store data - the public GA4 export of the Google Merchandise Store - and publishing every result, including the ones that did not work. The question behind the series: does a recommendation engine add 2% or 12% to a shop's revenue, and how would you know?

Part 1

Your analytics data is lying to your recommender

Product views over-counted 13.6 times, nine product IDs for one sweatshirt, and a crawler responsible for 29% of all product-page views. What has to be fixed before any model is trained.

Part 2

A recommendation engine written in 30 lines of SQL beat the bestseller list by 60%

Five models on the same held-out January sessions. The winner has no training step, the textbook ranking loses fifteen points, and the purchase-only model comes last.

Part 3

Measuring a recommender honestly

What an offline test cannot tell you, and the ladder from a held-out score to a live holdout group. Coming soon.

Customer lifetime value

Which customers are worth paying for? Worked through on two years of real order history from a UK online retailer, ending with the part that changes a budget: handing a predicted value back to the ad platform that bids on your behalf.

Part 1

Your customer acquisition cost is judged against the wrong number

The top 10% of customers produced 64% of two-year revenue, the first order was 14% of a customer's value, and first-order value identified one in three of the customers who ended up mattering.

Part 2

Customer value becomes predictable after 90 days, not after the first order

How long a retailer has to wait before an acquired customer stops being a guess: 42% of the eventual top decile visible from the first order, 67% after 90 days, and where the curve flattens.

Part 3

Teaching Google Ads what a good customer is

Value-based bidding on predicted lifetime value, and the export that makes it possible. Coming soon.

Every figure in these articles is reproducible from public data: the ga4_obfuscated_sample_ecommerce dataset published by Google through the Cloud Public Datasets Program, and UCI Online Retail II (Chen 2012, CC BY 4.0). The queries are in the articles.

Start Your Data Transformation Journey

Discover practical, scalable solutions tailored to your business priorities.