Guides

How to run marketing mix modeling

What data an MMM needs, the build-vs-buy choice between open-source libraries and managed vendors, and how to validate the model with real experiments.

marketing mix modeling (MMM) estimates how much each marketing channel contributed to an outcome — revenue, sign-ups, store visits — using statistical regression analysis on aggregate spend and outcome data over time, rather than tracking individual customers. It does not need cookies, a pixel, or user-level data, which is why it has moved from a specialist technique used mainly by large CPG advertisers to something mid-market marketing teams are building or buying as individual-level tracking keeps eroding. Its price for that resilience is coarseness: MMM tells you how channel-level spend related to outcomes across a whole market, not which individual customer touchpoint mattered.

The data an MMM actually needs

MMM is unforgiving of thin data. At minimum you need:

  • Two to three years of weekly spend by channel, with enough variation in spend levels to let the model separate one channel's effect from another's. A channel that has run at a nearly constant budget the whole period gives the model almost nothing to learn from.
  • The outcome metric at the same weekly grain, cleaned of anomalies that aren't marketing-driven (an outage, a pricing change, a stockout).
  • Control variables: price changes, promotions, seasonality, competitor activity where you can get it, and macro factors if they move your category. Leaving these out lets the model wrongly credit marketing for swings that had nothing to do with it.
  • Geographic-level data, if you can get it. Regional variation in spend gives the model far more to work with than one national time series, and it's what makes geo-level validation experiments possible later.

If you don't have this yet, the honest answer is to wait and start collecting cleanly rather than fitting a model on eighteen months of noisy, control-variable-free data and trusting the output.

Build it yourself, or buy it as a service

Two open-source libraries dominate the DIY route, and both are code, not products — no dashboard, no account, no support line if the output looks wrong.

Meridian is Google's open-source Bayesian MMM library in Python, the successor to LightweightMMM, and can incorporate Google-specific reach and frequency signals where available. Robyn, Meta's open-source R package, uses ridge regression with a genetic-algorithm-driven search for the adstock and saturation curves that describe how each channel's effect builds and decays over time. Both require someone fluent in causal-inference-aware modeling — a data scientist or ML engineer — who can validate the fitted curves against business judgment rather than accepting whatever the algorithm converges on.

The managed alternative is a vendor who builds, maintains and refreshes the model for you. Recast runs Bayesian MMM as a service and pairs it with geo-experiment design specifically to calibrate the model against real holdout tests — addressing MMM's classic weakness of relying only on historical variation, which can't fully separate correlated channels that moved together. The trade-off against the open-source route is straightforward: ongoing cost, in exchange for not having to hire and retain the modeling expertise in-house.

Validate the model, don't just trust it

An MMM fit purely on historical data can be internally consistent and still wrong, because channels that tend to move together (a brand campaign that launches alongside a promotion, for instance) are statistically hard to separate without an intervention that breaks the correlation. This is why incrementality testing — a real, randomized holdout — is the standard check on an MMM's output, not an alternative to it. Haus and Measured both run geo-based incrementality tests specifically to validate or calibrate a marketing mix model: hold out or vary spend in matched regions, measure the actual causal lift, and use that result to correct the model's channel-level estimates rather than relying on the regression alone. A model that has never been checked against a real holdout should be treated as a hypothesis about channel performance, not a settled number to build a budget around.

Reading the output correctly

An MMM's headline output is usually a set of response curves — how much incremental outcome an additional dollar buys at the current spend level for each channel — and a budget-reallocation recommendation. Two things to watch:

  • Diminishing returns are the point, not an error. A channel showing a strong return at current spend and a weak one at double the spend is telling you something real about saturation, not contradicting itself.
  • The model's confidence interval matters as much as the point estimate. A Bayesian MMM should report uncertainty around each channel's contribution; a wide interval on a channel means the model isn't sure, and reallocating a large budget based on a highly uncertain estimate is a bet, not a fact.

A shortlist by situation

  • You have a data scientist, multi-year spend history, and want full control with no license cost. Meridian (Python) or Robyn (R) — pick based on which language your team already works in.
  • You want rigorous MMM without building the modeling capability in-house. Recast, which pairs the model with geo-experiments to validate it.
  • You need the causal check on an existing MMM, or want incrementality as the primary method. Haus or Measured, both built around geo-based holdout testing.

Questions to ask before you commit

  • How many weeks of history, and how much spend variation per channel, does the model need before it produces a trustworthy estimate?
  • Has this model (or will it) ever be checked against a real geo-experiment, and how often is that recalibration repeated?
  • What controls (seasonality, promotions, price, macro factors) does the model include, and which are we responsible for supplying?
  • Who interprets a channel's response curve when it changes sharply between refreshes — is that expected saturation, or a data problem?

Common mistakes

  • Fitting a model on too little history or too little spend variation and trusting the output as if it were precise.
  • Leaving out control variables like promotions or seasonality and crediting marketing for swings they didn't cause.
  • Never validating the model against a real experiment, so correlated channels stay statistically tangled indefinitely.
  • Reading a wide-uncertainty channel estimate as a confident number and reallocating a large budget on it.
  • Rebuilding the model from scratch every time instead of refreshing it, which throws away the calibration work already done.

To choose whether MMM is the right method for your situation in the first place, see how to choose an attribution model, and for the broader shift away from user-level tracking, see how to measure marketing without third-party cookies. Browse attribution and marketing mix modeling tools for the full field.

Related tools

Terms used in this guide

Latest on this topic