Marketing mix modelling

Marketing mix modelling estimates what each channel adds to sales and where more spend stops paying back. The model is a Bayesian regression with adstock and saturation, in open-source code you can run yourself. Each channel's contribution comes with an interval.

Last reviewed

Paid search response curve, example

The next £1,000 a week on paid search buys 19 orders

Example data
Response curve, example data. Weekly orders attributed to paid search rise steeply with weekly spend, then flatten, from 0 orders at £0 to about 496 at £16,000, inside a grey 90% credible interval band. At the current £9,500 a week the curve gives 410 orders. At £10,500 it gives 429, so the next £1,000 a week buys 19 more orders.Weekly orders attributed to paid searchWeekly paid search spend0100200300400500£0£8,000£16,000+£1,000+19Current spend: £9,500 a week, 410 ordersCurrent spend£9,500 a week, 410 ordersResponse curve, example data. Weekly orders attributed to paid search rise steeply with weekly spend, then flatten, from 0 orders at £0 to about 496 at £16,000, inside a grey 90% credible interval band. At the current £9,500 a week the curve gives 410 orders. At £10,500 it gives 429, so the next £1,000 a week buys 19 more orders.Weekly orders attributed to paid searchWeekly paid search spend0100200300400500£0£4,000£8,000£12,000£16,000+19+£1,000Current spend: £9,500 a week, 410 ordersCurrent spend£9,500 a week, 410 ordersThe curve's rise from£9,500 to £10,500 aweek: 429 − 410 = 19orders.90% credible interval, from the model'sposterior draws of the curve.Response curve, example data. Weekly orders attributed to paid search rise steeply with weekly spend, then flatten, from 0 orders at £0 to about 496 at £16,000, inside a grey 90% credible interval band. At the current £9,500 a week the curve gives 410 orders. At £10,500 it gives 429, so the next £1,000 a week buys 19 more orders.Weekly orders attributed to paid searchWeekly paid search spend0100200300400500£0£4,000£8,000£12,000£16,000+19+£1,000Current spend: £9,500 a week, 410 ordersCurrent spend£9,500 a week, 410 ordersThe curve's rise from £9,500 to£10,500 a week: 429 − 410 = 19orders.90% credible interval, from the model's posterior drawsof the curve.Response curve, example data. Weekly orders attributed to paid search rise steeply with weekly spend, then flatten, from 0 orders at £0 to about 496 at £16,000, inside a grey 90% credible interval band. At the current £9,500 a week the curve gives 410 orders. At £10,500 it gives 429, so the next £1,000 a week buys 19 more orders.Weekly orders attributed to paid searchWeekly paid search spend0100200300400500£0£2,000£4,000£6,000£8,000£10,000£12,000£14,000£16,000+19+£1,000Current spend: £9,500 a week, 410 ordersCurrent spend£9,500 a week, 410 ordersThe curve's rise from £9,500 to£10,500 a week: 429 − 410 = 19 orders.90% credible interval, from the model's posterior draws of thecurve.
The curve's rise from £9,500 to £10,500 a week: 429 − 410 = 19 orders.90% credible interval, from the model's posterior draws of the curve.
Next £1,000 a week
19more orders
Cost of each of those orders
£52.63
90% interval on the 19
11 to 28 orders
Cost of each across that interval
£35.71 to £90.91
Current weekly spend
£9,500
Orders attributed to paid search at current spend
410 a week
Average cost per order
£23.17
Example data: an invented retailer's paid search. The average cost per order of £23.17 describes the spend so far. The next £1,000 buys orders at £52.63 each, and that is the figure a budget increase should be judged on.

What this fixes

Four signs the budget split needs a model behind it.

The returns add up to too muchEach platform's dashboard shows a healthy return, and together they claim more sales than the business made.
The tracking sees less each yearConsent declines and browser limits hide more of the journey, and TV, radio and outdoor never showed up in click data at all.
The budget is last year's, nudgedThe split between channels moves a few points each year, and nobody can say where the next pound would do the most.
The model nobody could openAn earlier model gave one number per channel, with no interval and no code to look at, and finance stopped believing it.

What a marketing mix modelling project hands over

The data set, model, curves and scenarios you keep.

The data setWeekly spend and outcome by channel, with price, promotion and seasonality columns, built from your own systems and documented column by column.
The modelCode in your repository using an open-source library, with its assumptions written down, ready to run again on new weeks.
Contribution by channelWhat each channel added over the period, with an interval on every figure.
Response curvesOne for each channel, like the paid search curve above, showing the cost of the next order at your current spend.
The checks packOut-of-sample fit, the comparison with any holdout tests, and the interval on each channel, all in one document.
Budget scenariosWhat the model expects if spend moves between channels, given as a range, ready to sit beside the budget lines of a monthly pack like the finance dashboard in our KPI library.

A budget decision needs the cost of the next order, and the average cost per order hides it.

How a marketing mix model is built

From the budget decision to a checked model.

  1. 1

    Scoping

    Start with the decision the model has to support, usually next year's split between channels. Then check the data: two years of weekly spend and orders, and whether each channel's spend ever varied.

  2. 2

    Data

    Weekly spend from invoices or platform exports, the outcome from the order system, and the controls: price, promotions, seasonality, bank holidays and stock-outs.

  3. 3

    Model

    Adstock carries part of each week's effect into the weeks after, because an ad seen on Monday can sell something the following week. Saturation bends each channel's curve, so every extra pound buys a little less than the one before. The starting assumptions for each channel, called priors, are written down and shown to you before the fit.

  4. 4

    Checks

    The last quarter of data is held back and the model has to predict it. Any holdout test results are set beside the model's estimate for the same channel and weeks.

  5. 5

    Handover

    The code, the data set and the checks pack stay with you, along with a short guide to refitting it each quarter.

Where marketing mix models go wrong

Common model failures and the guard against each.

Two channels that move togetherSearch and social both go up every November, and the model can't tell which one did the work. The guard is showing you where that happens, then using a holdout test or a deliberate change in one channel's spend to separate them.
The channel that gets credit for ChristmasLeave seasonality or promotions out and whichever channel spends most in December takes the credit for December. The guard is the controls, plus the held-back quarter, which a model that has learnt the calendar as a channel will predict badly.
One number per channelA budget gets moved on a point estimate the model was never sure of. The guard is an interval on every contribution and a range on every scenario. Where the interval is too wide to act on, the checks pack says so.

Every channel's contribution ships with its interval. Where that interval is too wide to act on, the next holdout test goes there.

What econometric modelling needs from your data

The weekly data to have before a model is promised.

Two years of weekly data or more, so the model sees every season at least twice. For each channel, weekly spend, or impressions and ratings for TV and radio. The outcome, orders or revenue, from the order system. Price, promotions, seasonality and anything else that moved sales without being marketing.

Less data changes the plan. Twelve to eighteen months can still support a model, with tighter priors taken from tests, and the intervals will be wide. A channel whose spend never varied can't be read at all, so it gets a geo test or a planned change in spend. Under a year of history, start with incrementality testing and build the model once the weeks are there.

Checking a model of marketing effectiveness

The three checks that ship with every model.

Out-of-sample fit: the error on the held-back quarter, set against the error on the weeks it was trained on. If the held-back error is much worse, the model has learnt noise. The holdout comparison: where a geo test has measured a channel, the model's estimate for the same weeks should fall inside the test's interval. If it doesn't, the test result goes in as a prior and the model is refitted. And the interval on each channel, so you can see which numbers are firm and which are guesses.

Marketing mix models by industry

The controls each sector's model needs.

EcommercePromotions and stock-outs move weekly orders more than most channels, so they go in as controls before any channel gets credit.
Subscription and mediaA second model on subscribers still paying after renewal shows which channels bring people who stay.

Marketing mix modelling is one half of marketing measurement. The other half is the holdout tests that check it.

Questions people ask

Answers on software, TV and radio, refits and tracking.

Do you build marketing mix models for ecommerce brands?

Yes. The outcome is usually weekly orders or revenue net of returns, taken from the order system. Promotions and stock-outs go in as controls, because a sale week or an empty warehouse moves orders more than most channels do.

Is marketing mix modelling useful for subscription businesses?

Yes, with one change. The model is fitted on new subscribers, and a second version on subscribers still paying after the first renewal, so a channel full of trial sign-ups that cancel doesn't get credit it hasn't earned.

Which software do you use?

An open-source Bayesian library, usually Google's Meridian or PyMC-Marketing, chosen by which one your team can run. Either way the code sits in your repository and runs again on new data without us.

Can the model measure TV, radio and outdoor?

Yes, provided you have weekly spend or ratings for each. The model works from aggregated spend and sales, so it needs no user-level tracking, and a channel a click never reaches goes in like any other.

How often does the model need refitting?

Quarterly is typical, so new weeks of data and any new test results go in. A refit also shows whether a channel's curve has moved since the last one.

Does our tracking need fixing first?

The model needs no user-level data. It needs weekly spend that matches your invoices and an outcome taken from the order system. If those disagree with what the platforms report, that's tracking work and worth doing anyway.

Book a call about your media budget

Bring the channel split you're least sure of. The first call checks whether your data can support a model, and what to do first if it can't.

Book a call