How we learned to honestly measure the effect of promo codes: Causal Inference in X5 Digital online delivery

Alexander Korenkov5 Mar 2026

Problem

A promo analyst at an online delivery service sees that users who applied a promo code spent 800 rubles more than average. The comparison is biased: promo codes reach everyone in a wave, but mostly the already engaged customers activate them, and seasonality inflates the before-and-after change. Randomized holdouts are often impossible, because codes go out to the whole wave and the effect of past campaigns has to be measured retrospectively. Without a causal estimate, the money goes to discounts for people who would have bought anyway.

Example from the article: a promo launched in December shows sales up 30%, but the holiday season alone would have lifted sales.

Solution in brief

X5 Digital matches each promo-applying user to a similar user who did not apply the code (propensity score matching, PSM), then compares their weekly turnover before and after the wave (difference-in-differences, DiD). A parallel-trends test flags unreliable waves. A CatBoost model then learns to predict the uplift of a new wave from the estimated effects of past ones.

Questions this case answers
  • How to estimate the incremental effect of a campaign already delivered to everyone when only observational data is available and the users who respond are the most engaged ones
  • How to predict the incremental effect of a future campaign from the estimated effects of past ones
  • How to measure the incremental revenue of a promo code campaign that has already run, without an A/B test?
  • How to tell whether matched treated and control users are comparable enough to trust the estimate?

Tools and methods

  • Propensity score matching — pairs treated and control users on their pre-promo behavior.
  • Difference-in-differences — removes the shared trend and seasonality from the matched comparison.
  • Standardized mean difference (SMD) — checks that matching balanced the covariates.
  • Winsorization — clips outliers to boundary percentiles.
  • CatBoost — predicts the uplift of new promo waves.
Continue reading — it's free

Google or a one-time email code. No password.