Allocating an eCommerce ad budget: marginal returns and incrementality
TL;DR
Difficulty: Advanced
Give every channel the same return on the next pound, and grow the total budget while that return is above breakeven.
- The average ROAS describes money already spent. Decisions need the marginal ROAS, the return on the next pound.
- Draw a response curve per channel (a Hill curve works well) and read the marginal return off it.
- Move money from lines where the next pound earns little to lines where it earns a lot, until the marginal returns are equal.
- Calibrate every curve with holdout or spend step tests, never with platform reports alone.
- Move in steps close to your data, check cash, and follow the season with the same rule, every month.
Every month the same question: one budget, several channels, and each platform says it deserves more. This chapter shows how to answer it with response curves and marginal returns, anchored to tests, and how the same £14,000 at an invented homeware shop in Leeds goes from £4,271 to £8,451 of contribution without a pound added.
The next pound is the only one you can still decide
Every shop that advertises on more than one channel ends up with the same question at the end of the month: there is a budget, there are four or five places to spend it, and each platform says it deserves more. How do you split it so that the money earns the most?
Most shops give more to the channel with the best return so far. That sounds sensible and is usually wrong. The return so far is an average over every pound already spent. Your decision is only ever about the next pound, and the next pound almost never earns what the average pound earned.
This chapter shows the method that answers the question properly. You draw a response curve for each channel: how much extra revenue each level of spend brings. You read the marginal return off each curve, the return on the next pound. You then move money until the next pound earns the same everywhere. The curves come from tests, not from the platforms' reports, and a simple monthly routine keeps them honest. At the end there is Python code that fits a curve and splits a budget, so you can do it with your own numbers.
It builds on two earlier chapters. ROAS, POAS and MER explains why the platforms' return on ad spend (ROAS) overstates what ads earn and where the breakeven line sits. Where should an online shop advertise describes the channels themselves. If either is new to you, read it first.
Example: today's £14,000 at Wrenfield
Wrenfield Home is the example shop of this series: an online homeware shop in Leeds (wrenfieldhome.example) selling ceramics, kitchen textiles, lamps and small furniture. Priya owns it, Callum is her developer. All figures are the example's, invented for teaching.
Priya spends £14,000 a month on ads: £9,000 on Google and £5,000 on Meta. Callum has split that into the five lines that actually behave differently, and over the past months he has measured with holdout tests how many orders each line really causes (the incremental orders, the ones that would not have happened without the ad). Revenue here is net revenue, without VAT, at £60 per order. Contribution before marketing is £19.86 per order, so every pound of net revenue leaves , or 33.1p, before the ads are paid. These are the figures from the ROAS, POAS and MER chapter, which works them out step by step.
| Line | Spend | Incremental orders | Incremental net revenue | Average ROAS | Contribution after ads |
|---|---|---|---|---|---|
| Brand search | £1,500 | 50 | £3,000 | 2.00 | minus £507 |
| Google Shopping, non brand | £5,500 | 475 | £28,500 | 5.18 | £3,934 |
| Google Search, non brand | £2,000 | 200 | £12,000 | 6.00 | £1,972 |
| Meta prospecting | £2,400 | 91 | £5,460 | 2.28 | minus £593 |
| Meta retargeting | £2,600 | 104 | £6,240 | 2.40 | minus £535 |
| All five | £14,000 | 920 | £55,200 | 3.94 | £4,271 |
Contribution after ads is net revenue times 0.331, minus spend. For brand search: , a loss of £507. Added up, the ads leave Priya £4,271 a month, the same figure the ROAS chapter arrived at by a different route.
Three of the five lines lose money on average. The obvious reaction is to cut those three and pour the money into the two that earn. By the end of this chapter you will see that the right answer is more interesting: one of the three losers deserves far more money, not less.
Average return and marginal return answer different questions
The average return of a channel is everything it brought divided by everything it cost. The marginal return is what the next pound brings. They are different numbers because channels get less efficient the more you spend on them. The Foundations section on marginal and average explains the general idea.
where is the monthly spend on the channel, is the incremental net revenue that spend brings, is a small extra amount of spend and is the extra incremental net revenue it brings. When the step is very small, becomes the slope of the curve, written .
The rule that follows: a pound is worth spending when its marginal return is above breakeven. With 33.1p of contribution per pound of net revenue, breakeven is . Every pound that brings back more than £3.02 of incremental net revenue adds profit. Every pound that brings back less takes it away, however good the average looks.
Example: brand search at three spend levels
Brand search shows the gap at its widest. People searching for "Wrenfield Home" find the shop's own organic result anyway, so most of what a brand ad collects would have arrived for free. That is exactly what large field experiments at eBay found: when eBay switched off its brand keyword ads, 99.5% of the lost paid clicks came back through the organic results1.
Some brand spend still earns. A competitor may bid on Priya's name, and a small budget keeps her ad on top for the searches where that matters. Callum's curve for brand search, which the next section explains, gives these figures:
| Brand spend | Incremental net revenue | Average ROAS | Marginal ROAS |
|---|---|---|---|
| £200 | £1,440 | 7.20 | 4.32 |
| £300 | £1,800 | 6.00 | 3.00 |
| £750 | £2,571 | 3.43 | 0.98 |
| £1,500 (today) | £3,000 | 2.00 | 0.33 |
At £1,500 the average says 2.00, below breakeven but not catastrophic. The margin says 0.33: the last pound brings back 33p of net revenue, which leaves , about 11p of contribution, for a pound spent. Somewhere between £200 and £300 the marginal return crosses breakeven. That is where brand spend should stop, and at that point the average return is excellent.
Every channel flattens out, and a response curve shows how
Why does the next pound earn less than the last? Three reasons, and every paid channel has all three to some degree. First, each channel reaches a limited number of people who are ready to buy, and the most likely buyers are reached first. Second, in an auction the extra reach costs more per click, because you have to outbid more competitors (the auction theory article shows the mechanics). Third, the same people see the ad more often, and the fifth showing adds less than the first.
A response curve draws this. The spend goes along the bottom, the incremental revenue up the side, and the curve bends over as spend grows. Google's researchers built exactly this shape into their media mix models, with flexible curves for diminishing returns and a separate term for the way advertising carries over into later weeks2.
The Hill curve and its three numbers
A common choice is the Hill curve. Google's open source Meridian model uses it for saturation and describes it with two parameters, a half saturation point and a slope3. Written for a shop's monthly spend, see Foundations: ratios and rates for the fractions involved:
where is the incremental net revenue at monthly spend , is the ceiling (the most incremental revenue the channel could ever bring, however much you spent), is the half saturation point (the spend at which the channel reaches half its ceiling) and is the slope, which sets the shape. With the curve bends over from the very first pound. With above 1 it starts slowly, rises steeply and then flattens, an S shape.
Example: the Shopping curve, worked through
Callum's curve for non brand Google Shopping has , and . At today's spend of £5,500:
So the curve says Shopping brings pounds of incremental net revenue at £5,500, which matches the tested 475 orders at £60 each. The ceiling of £150,000 is far away, so Shopping still has plenty of room. Doubling the spend to £11,000 would bring , which is 68% more revenue for 100% more spend. That is diminishing returns in one line.
The marginal return, read straight off the curve
The slope of a Hill curve has a convenient form. It needs only numbers you already have. The derivation uses the chain rule, but the result is simple. Foundations: marginal and average shows why a slope is a marginal value.
where is the marginal ROAS at spend , is the average ROAS at that spend, is the slope parameter and is how far the channel already is towards its ceiling. In words: the marginal return is the average return, times the slope, times the share of the ceiling still left.
Example: marginal returns for all five lines
For Shopping, the average is , the slope and the share used up :
So the next pound in Shopping brings pounds of net revenue, well above the breakeven of .
For Meta retargeting, the curve has , so the line is already at of its ceiling. Retargeting only reaches people who have already visited the shop, and most of them are already reached:
So the last pound in retargeting brings back pounds. For Meta prospecting the curve has and , so it is only at of its ceiling:
So prospecting has a poor average, , and an excellent marginal return, . Here is the whole picture:
| Line | Spend | Average ROAS | Marginal ROAS | Next pound against breakeven of 3.02 |
|---|---|---|---|---|
| Brand search | £1,500 | 2.00 | 0.33 | loses money |
| Shopping, non brand | £5,500 | 5.18 | 4.20 | earns |
| Search, non brand | £2,000 | 6.00 | 4.40 | earns |
| Meta prospecting | £2,400 | 2.28 | 4.10 | earns |
| Meta retargeting | £2,600 | 2.40 | 0.26 | loses money |
Meta prospecting is the line that loses money on average and deserves more. It loses on average because the first pounds of an S curve are spent below the point where the channel starts working. The next pounds land on the steep part.
The S curve has a threshold
An S shaped curve means a channel can look useless at a small budget and work well at a larger one. This matters most for prospecting on Meta, TikTok or YouTube, where the platform needs enough conversions to learn whom to show the ad to, and where a message needs a few showings before it sticks. Meta documents a learning phase for ad sets, a period in which its delivery system is still working out whom to show the ads to4.
Example: prospecting below and above the threshold
On Callum's prospecting curve, the marginal return at different spend levels is:
| Prospecting spend | Incremental net revenue | Average ROAS | Marginal ROAS |
|---|---|---|---|
| £1,000 | £1,033 | 1.03 | 2.03 |
| £2,400 (today) | £5,460 | 2.28 | 4.10 |
| £4,000 | £12,877 | 3.22 | 4.92 |
| £6,200 | £23,248 | 3.75 | 4.31 |
| £8,000 | £30,166 | 3.77 | 3.37 |
The marginal return rises from £1,000 to £4,000 and only then falls. A shop that tested prospecting at £1,000 a month, saw an average of 1.03 and switched it off, would have drawn the wrong conclusion from a correct number. The marginal return peaks at about £4,000 and is still above breakeven at £8,000.
The log curve, a simpler alternative
Some analysts use a logarithmic curve instead. It has one parameter fewer and no ceiling. See Foundations: logarithms if logs are rusty.
where sets the height of the curve, sets how soon it bends, is the natural logarithm and is again the marginal ROAS.
Example: Hill and log fitted to the same point
Callum fits a log curve to non brand search so that it passes through today's point, £12,000 of revenue at £2,000, with the same marginal return of 4.40. That gives and . Check at £2,000: . Now compare the two curves further out:
| Search spend | Hill curve | Log curve |
|---|---|---|
| £2,000 | £12,000 | £12,000 |
| £4,000 | £18,947 | £19,185 |
| £8,000 | £26,667 | £28,341 |
| £20,000 | £35,294 | £42,608 |
Near the data the two agree within about 1%. Far away they part, because the log curve never stops rising. The lesson is not which curve is right. It is that no curve knows anything about spend levels you have never tried. Keep decisions close to the range your data covers, and test before you go further.
The best split gives every channel the same marginal return
Now the central rule. Suppose the next pound in retargeting brings £0.26 and the next pound in prospecting brings £4.10. Move one pound from retargeting to prospecting and you lose £0.26 of revenue and gain £4.10. Keep moving, and the gap shrinks: retargeting's marginal return rises as you cut it, prospecting's eventually falls as you add. You stop when the two are equal, because then moving a pound gains nothing.
Apply the same argument to every pair of channels, and you get the condition for the best split of a fixed budget. Economists call it the equimarginal principle. In the language of optimisation it is the condition a Lagrange multiplier produces. The optimisation under uncertainty article derives it for two channels, so here it is stated for any number. For the fractions, see Foundations: marginal and average.
where is the spend on channel , is its marginal ROAS at that spend, is the number of channels, is the total budget and is the common marginal return all funded channels settle at. A channel whose best marginal return is below even at its first pound gets nothing. If comes out above breakeven, the budget is too small to fund everything worth funding. If it comes out below breakeven, the budget is too big.
Example: the first £100 moved
Callum moves £100 from retargeting to prospecting. Retargeting loses about pounds of net revenue and prospecting gains about pounds. The net change in revenue is , and in contribution , so about £127 a month more for the same total spend. One hundred pounds moved, £127 of profit found. That is how large the gaps between marginal returns are in a typical account.
Example: the full split of £14,000
Callum solves for the at which the five spends add up to exactly £14,000. It comes out at . Each line's spend is then where its marginal return equals 4.31. Rounded to the nearest £100:
| Line | Today | Best split | Change | Marginal ROAS at best split | Contribution after ads |
|---|---|---|---|---|---|
| Brand search | £1,500 | £200 | minus £1,300 | 4.32 | £277 |
| Shopping, non brand | £5,500 | £5,100 | minus £400 | 4.32 | £3,770 |
| Search, non brand | £2,000 | £2,100 | plus £100 | 4.28 | £2,016 |
| Meta prospecting | £2,400 | £6,200 | plus £3,800 | 4.31 | £1,495 |
| Meta retargeting | £2,600 | £400 | minus £2,200 | 4.32 | £893 |
| Total | £14,000 | £14,000 | £0 | £8,451 |
The same £14,000 now leaves instead of pounds of contribution, almost twice as much. Nothing was added to the budget. Every line now earns more on the next pound than the breakeven of 3.02, so every line contributes, including the two that lost money at today's spend.
Read the table with care. Shopping goes down slightly, though it has a high marginal return, because prospecting at £6,200 is even better, and the money is fixed. Meta as a whole rises from £5,000 to £6,600 although Meta lost money in the ROAS chapter: the loss came from retargeting, not from the platform. And the jump in prospecting from £2,400 to £6,200 goes far beyond anything Priya has ever spent there, which brings its own problem. The section on tests deals with it.
How big the total budget should be
The split answers "where does the money go". The total answers "how much money". The same marginal logic answers both: keep raising the budget while , the marginal return of the best split, is above breakeven.
The value of one more pound of budget follows directly from , see Foundations: marginal and average:
where is the extra contribution from one more pound of budget, spread the best way, is the common marginal ROAS at the current budget and is the contribution per pound of net revenue (here 0.331). When falls to zero, the budget is at its best size.
Example: what each extra pound of budget is worth
At £14,000, , so . Each extra pound, well placed, leaves 43p. Callum repeats the best split at other totals:
| Monthly budget | Value of the next pound | Contribution after ads | |
|---|---|---|---|
| £10,000 | 4.90 | 62p | £6,336 |
| £12,000 | 4.62 | 53p | £7,494 |
| £14,000 | 4.31 | 43p | £8,451 |
| £16,000 | 4.00 | 33p | £9,201 |
| £18,000 | 3.72 | 23p | £9,756 |
| £20,000 | 3.46 | 14p | £10,129 |
| £22,000 | 3.22 | 6p | £10,336 |
| £23,800 | 3.02 | 0p | £10,393 |
The best total on these curves is about £23,800, where contribution peaks at £10,393. In that split Google gets about £14,500, close to the £13,700 the ROAS chapter found with a single curve for all of Google. Notice how flat the top is: going from £20,000 to £23,800 adds only £264. The last few thousand pounds are close to worthless, and they carry the most risk, because they sit furthest outside the data. A sensible plan stops well short of the mathematical top.
New customers are worth more than their first order
So far each order is worth its own contribution and nothing more. But a first order from a new customer brings a chance of later orders, and in this series 28% of first time customers buy again within twelve months. Prospecting mostly brings new customers, retargeting mostly brings back people who would have come anyway. Counting the future orders shifts the balance further towards prospecting. The chapter on customer acquisition cost, payback and LTV to CAC shows how to value a new customer properly, and the repeat purchase chapter how to estimate the repeat rate.
Example: a simple uplift for prospecting
A cautious version counts one repeat order for 28% of new customers: pounds of extra contribution per first order. Per pound of net revenue that is . So for prospecting, where nearly every order is a first order, the contribution per pound becomes , and the breakeven marginal ROAS drops from 3.02 to . Callum keeps this as a second column in his sheet rather than mixing it into the main one, because the repeat rate is an estimate with its own uncertainty, and a twelve month payback needs cash in the meantime.
Cash can be the tighter limit
The best budget on paper assumes money is free until the orders pay it back. It is not. Ads are paid within days. More orders also mean more stock bought in advance, and the contribution arrives over the following weeks. A budget that maximises contribution can still empty the bank account.
Google Ads makes the timing less predictable than a monthly figure suggests: a campaign may spend up to twice its average daily budget on a single day, though over a month it charges no more than 30.4 times the average daily budget5. Plan cash on the monthly ceiling, not on the daily figure.
Example: from £14,000 to £18,000
Priya asks what it would take to go from £14,000 to £18,000. Split the best way at each level:
- Extra ad spend: pounds a month.
- Extra incremental net revenue: pounds a month.
- Stock for those sales, at a product cost of 48% of net revenue (the 52% gross margin turned round): pounds, bought before the goods sell.
- Cash out up front: pounds.
- Extra contribution: pounds a month.
So £11,693 of working capital buys £1,305 a month of contribution. The stock is not lost, it turns back into money as it sells, but while the higher budget runs, roughly that sum stays tied up. £1,305 a month on £11,693 is about 11% a month, a fine return if Priya has the cash. If the cash would come from an overdraft at a high rate, or would delay paying a supplier, the step to £16,000 is the safer one: it needs about half the working capital and brings £750 a month. The maths of the curves cannot make this call. It only makes the price of each choice visible.
Seasonality: spend more when buyers are there, less when they are not
Demand is not flat through the year. A homeware shop sells far more in November and December than in February. The response curves move with it: in a busy month the same spend reaches more people who are ready to buy, so the ceiling is higher.
The rule does not change. Over a year, the best plan gives every month the same marginal return as well as every channel. That means spending more than in proportion in strong months and less than in proportion in weak ones. The simplest way to write the season into the curves is a demand index for each month, see Foundations: seasonality:
where is the incremental net revenue at spend in month , is the demand index of that month (1.0 is an average month, 1.45 is 45% busier) and is the curve for an average month.
Example: Priya's year with £168,000
Callum's demand index, from three years of order history, runs from 0.80 in February to 1.45 in November. The annual budget is pounds. He compares three ways to spread it: the same £14,000 every month, a budget in proportion to the index, and the best plan, with one common marginal return for every month and every line. Meta prospecting keeps a floor of £1,500 a month, so it never stops learning.
| Month | Demand index | Best plan spend | Contribution, best plan | Contribution, £14,000 flat |
|---|---|---|---|---|
| January | 0.85 | £9,885 | £3,842 | £5,083 |
| February | 0.80 | £5,899 | £2,237 | £3,961 |
| March | 0.90 | £11,918 | £5,514 | £6,206 |
| April | 0.95 | £13,467 | £7,132 | £7,328 |
| May | 0.95 | £13,467 | £7,132 | £7,328 |
| June | 0.90 | £11,918 | £5,514 | £6,206 |
| July | 0.85 | £9,885 | £3,842 | £5,083 |
| August | 0.85 | £9,885 | £3,842 | £5,083 |
| September | 1.00 | £14,875 | £8,804 | £8,451 |
| October | 1.10 | £17,458 | £12,332 | £10,696 |
| November | 1.45 | £25,180 | £26,352 | £18,554 |
| December | 1.40 | £24,165 | £24,213 | £17,431 |
| Year | £168,000 | £110,755 | £101,409 |
Over the year the best plan leaves pounds more than the flat budget. A budget in proportion to the index leaves £108,388, so even the simple rule captures most of the gain.
Two things in the table look strange at first. January earns less under the best plan than under the flat budget. That is correct: money taken out of January earns more in November, so January is deliberately starved. And February spends far less than January, although the index is only slightly lower. That is the S curve of prospecting: in February its best marginal return falls below the year's common level, so it drops to its floor of £1,500 instead of shrinking smoothly.
Pacing inside the month
A monthly plan still has to be spent day by day. Automated bidding already adapts to the usual weekly and seasonal patterns. For short events where the conversion rate jumps, such as a sale weekend, Google Ads offers seasonality adjustments that tell Smart Bidding to expect the change. Google recommends them for events of one to seven days, and warns that results may suffer if they run longer than 14 days6. For a whole season, change the budgets, not the bidding's expectations.
Example: pacing November
Callum sets November's £25,180 as weekly budgets weighted by last year's weekly orders, with the Black Friday week at about a third of the month. For the four day Black Friday sale itself, he adds a seasonality adjustment to the Shopping and Search campaigns that run on target ROAS, raising the expected conversion rate by the uplift seen in last year's sale. Every Monday he checks the Google Ads report for search lost impression share due to budget, the share of the time the ads were not shown because the budget ran out7. Above zero on a line whose marginal return is above the month's level, he moves money in from a line that is not using its budget.
Curves come from tests, not from platform reports
Everything so far depends on the curves being right. And the easy way to draw them, plotting each week's spend against the revenue the platform reports for that week, gives curves that are badly wrong.
The platform's revenue is attributed, not incremental. It includes the people who would have bought anyway, and the share of those varies by channel, as the brand and retargeting lines above show. Worse, spend and sales move together for reasons that have nothing to do with the ads: you spend more in December because December sells more. A curve fitted to that data mistakes the season for the effect of the ads. The eBay study shows how far off this goes: a simple regression of sales on paid search spend put the return on investment above 4,100%, and still above 1,400% with controls for time and region, while the experiment found a loss of 63% of the money spent, with a 95% range from a loss of 124% to a loss of 3%1. Brett Gordon and colleagues compared 15 large experiments at Facebook with the observational methods advertisers usually use, and found the observational methods often failed to reproduce the experimental results, even with rich data on every user8.
So the curves need experiments. Experiments are also noisy: Randall Lewis and Justin Rao analysed 25 large field experiments at retailers and brokerages and found that the median confidence interval on the return on investment was more than 100 percentage points wide9. A small shop cannot measure everything precisely. It can measure the few things that move the most money, and calibrate the curves with them. The five ways to prove a campaign worked and the attribution chapter explain how holdout and geo tests are designed. This chapter uses their results.
Calibrate the height of a curve with a holdout result
A holdout test tells you, at one spend level, how much of the platform's claim is real. If the platform data gives the shape of a curve, the test fixes its height. Multiply the whole curve by the incrementality factor, see Foundations: ratios and rates:
where is the calibrated curve, is the curve fitted to the platform's attributed revenue, is the incrementality factor, is the number of orders the test showed the line causes and is the number the platform claimed over the same period.
Example: calibrating Meta prospecting
Meta claims 185 orders a month from prospecting at £2,400, worth pounds of net revenue. Callum's holdout showed 91 incremental orders. So . He fits a Hill curve to the weekly platform figures, then multiplies its ceiling by 0.49, which brings the curve down to £5,460 at £2,400, the tested figure. The slope parameter stays as fitted. This assumes that the share of real orders is the same at every spend level, which is an assumption, not a fact: at higher spend prospecting reaches colder audiences, where fewer buyers would have come anyway, so may rise. That is one more reason to test again after a big move.
Measure the slope directly with a spend step test
A holdout measures the average at one level. To measure the marginal return directly, change the spend, not by switching off, but by raising it in some regions and keeping it in others. The difference in extra revenue divided by the difference in spend is the marginal return between the two levels, see Foundations: marginal and average:
where is the measured marginal return, is the extra incremental revenue in the test regions against their prediction from the control regions, and is the extra spend in the test regions. Google's researchers described the geo experiment design for exactly this kind of question in 201110. Google Ads offers Conversion Lift based on geography to some accounts11, and Meta's open source team publishes GeoLift, code for exactly this analysis12.
Example: raising Shopping by half in 30% of the country
Callum picks regions that carry 30% of Wrenfield's revenue and raises Shopping spend there by 50% for a month: from 30% of £5,500, which is £1,650, to £2,475. The extra spend is £825. The curve predicts that moving the whole country from £5,500 to £8,250 would add pounds, so 30% of that, £3,162, in the test regions, a marginal return of .
The test measures £3,050 of extra revenue against the prediction from the control regions. That is a marginal return of . Given the noise in a single month, the rough range on this estimate runs from about 2.9 to 4.5, so the test confirms the curve without pinning it down exactly. Both the curve's 3.83 and the measured 3.70 sit above breakeven, so the extra Shopping money would earn. The decision holds even at the low end of the range, which is the only kind of test result worth acting on.
Step outside the data only in small steps
The best split moved prospecting from £2,400 to £6,200, and retargeting from £2,600 to £400. Priya's data covers prospecting between about £1,500 and £3,000 a month. Everything beyond that is the curve's guess. The S shape, the ceiling, the slope: all extrapolated. So the practical rule is to move each line part of the way towards its target, with limits that keep it near the observed range, test at the new level, and then refit.
Example: September's stepped plan
September is an average month, with a demand index of 1.0, so the budget stays at £14,000. Callum sets limits for it: brand search and retargeting may fall by half at most, to £750 and £1,300. Prospecting may rise to £3,400 at most, about 40% more than today. The other lines stay inside the ranges they have run at. Within those limits he solves for the best split of £14,000 again:
| Line | Today | Stepped plan | Marginal ROAS at the stepped plan |
|---|---|---|---|
| Brand search | £1,500 | £750 | 0.98 |
| Shopping, non brand | £5,500 | £6,190 | 4.00 |
| Search, non brand | £2,000 | £2,360 | 4.00 |
| Meta prospecting | £2,400 | £3,400 | 4.79 |
| Meta retargeting | £2,600 | £1,300 | 0.85 |
| Total | £14,000 | £14,000 |
Contribution after ads rises from £4,271 to £6,852, about £2,580 a month, without leaving the ground the data covers. The full gain to £8,451 waits for the next test. Brand search and retargeting are still below breakeven at their limits, so next month they fall again, and the cut to brand search runs as a test of its own: if competitors start appearing above Priya's name, the curve was wrong and the cut stops.
Marketing mix modelling for the long view
Tests calibrate one line at one moment. A marketing mix model (MMM) estimates all the curves at once from two or more years of weekly data, including the carry over of advertising into later weeks and channels with no clicks at all, such as print or podcasts. Its strength is the whole picture, its weakness the same confounding that the eBay study showed, which is why good models are calibrated with experiments. Meta's open source Robyn package, for example, calibrates its models with geo tests and lift studies and includes a budget allocator that reallocates spend with a constrained solver13. Google's Meridian uses the Hill curve from earlier in this chapter for saturation3. The media mix modelling article explains adstock, saturation and the model itself in depth, so I will not repeat it here.
Example: when Priya needs a model
Wrenfield has 14 months of clean weekly data, and Meta and Google spend rose together over that time, so a model could not yet tell them apart. The stepped plans help: by moving lines in different directions in different months, Callum creates the variation a model needs. With two years of data and four calibrating tests, the model takes over the yearly plan, and the tests keep checking it. Until then, the five curves above, each anchored to a test, do the job.
Fitting a curve and splitting a budget in Python
The method fits in about 30 lines of Python with NumPy and SciPy. The code does two things. First it fits a Hill curve to one line's monthly spend and calibrated revenue with curve_fit from SciPy, which finds the parameters that make the curve pass as close as possible to the data points by least squares14. Then it splits a budget across all five lines with minimize from SciPy, using the SLSQP method, which handles limits on each line and the condition that the spends add up to the budget15. Foundations: regression explains least squares fitting.
import numpy as np
from scipy.optimize import curve_fit, minimize
def hill(x, r_max, k, s=1.0):
"""Incremental net revenue at monthly spend x (a Hill curve)."""
x = np.asarray(x, dtype=float)
return r_max * x**s / (x**s + k**s)
# 1. Fit one channel: monthly spend and calibrated incremental net revenue
spend = np.array([3000, 3800, 4500, 5000, 5500, 6200, 6800, 7400])
revenue = np.array([17300, 20600, 24400, 26100, 28500, 31700, 33400, 36200])
params, cov = curve_fit(hill, spend, revenue, p0=[100000, 15000])
print("Shopping fit: r_max=%.0f k=%.0f" % tuple(params))
print("standard errors:", np.sqrt(np.diag(cov)).round(2))
# 2. Allocate a budget across channels, with floors and ceilings
m = 0.331 # contribution per pound of net revenue
budget = 14000
channels = { # r_max, k, s, floor, ceiling
"brand": (3600, 300, 1.0, 750, 1500),
"shopping": (150000, 23447, 1.0, 3000, 8000),
"search": (45000, 5500, 1.0, 1000, 3000),
"prospecting": (54600, 7200, 2.0, 1500, 3400),
"retargeting": (7000, 317, 1.0, 1300, 2600),
}
names = list(channels)
def contribution(x):
return sum(m * hill(xi, *channels[n][:3]) - xi for n, xi in zip(names, x))
result = minimize(lambda x: -contribution(x),
x0=[budget / len(names)] * len(names),
bounds=[channels[n][3:] for n in names],
constraints=[{"type": "eq", "fun": lambda x: x.sum() - budget}],
method="SLSQP")
for n, xi in zip(names, result.x):
print(f"{n:12s} {xi:8.0f}")
print("contribution after ads: %.0f" % contribution(result.x))
A few notes for a first reading. The function hill is the curve from earlier, with the slope at 1 unless you pass another value. curve_fit needs a starting guess, p0, for the ceiling and the half saturation point. It returns the fitted values and a covariance matrix, whose diagonal gives the standard errors. In the second part, minimize looks for the smallest value of a function, so the code hands it minus the contribution. The bounds are each line's floor and ceiling, and the constraints entry forces the spends to add up to the budget.
Example: what the script prints for Wrenfield
Run on Callum's eight months of Shopping data, the fit gives a ceiling of £151,088 with a standard error of £13,326, and a half saturation point of £23,638 with a standard error of £2,594. Those are close to the curve used throughout this chapter, and the standard errors are honest about the uncertainty: the ceiling could plausibly be £125,000 or £177,000, because eight months between £3,000 and £7,400 say little about what happens at £20,000. If you also let the slope float, the fit becomes unstable, because the data cannot tell a steeper curve with a lower ceiling from a flatter one with a higher ceiling. Fix the slope at 1 for search and Shopping unless you have data across a wide range.
The allocation part, with the limits of the stepped plan, prints brand 750, Shopping 6,188, search 2,362, prospecting 3,400 and retargeting 1,300, with a contribution after ads of £6,851. That is the stepped plan from the previous section, give or take rounding. Set the floors to zero and the ceilings high, and it returns the full best split instead.
A monthly budget routine
The method is only useful if it runs every month, with the same steps, in the same order. Here is the routine I would set up for a shop like this one. It takes about two hours once the data flows.
The steps, with what each one needs:
| Step | What you do | What it needs |
|---|---|---|
| 1. Close the month | Take orders, net revenue and refunds from the shop's own database, not from the ad platforms | Order data, the tracking plan in place |
| 2. Update the curves | Recalibrate any line with a new test result, otherwise keep the curve | The latest holdout or step test |
| 3. Marginal returns | Compute the marginal ROAS of each line at the spend it ran at | The curves, the formula from this chapter |
| 4. Solve the split | Equalise marginal returns within limits that keep each line near its data | The script, this month's floors and ceilings |
| 5. Check cash | Add the stock needed for the planned sales to the ad spend and compare with the cash forecast | A cash forecast, the forecasting chapter |
| 6. Season | Scale next month's budgets with the demand index | Order history by month |
| 7. Book a test | Pick the line where the curve is least certain and the money at stake is largest | A test calendar, one test at a time per line |
Example: Priya's October review
On the first Monday in October, Callum closes September: £14,000 spent on the stepped plan, and 0.3% fewer orders than the curves predicted, well within the noise. No new test result came in, so the curves stay. The marginal returns at September's spend range from 0.98 for brand search to 4.79 for prospecting, far more than half a point apart, so he solves again. The limits move on: brand search may fall to £400, retargeting to £650, prospecting may rise to £4,700. October's demand index is 1.10, so the total is £17,458 from the seasonal plan. Priya's cash forecast has room for it, including the extra stock for the Christmas range. The budgets go in, and the test calendar gets a prospecting holdout at the new level for the first weeks of October, before the Black Friday weeks make every test noisy, because prospecting is the line where the most money now rides on the least data.
Mistakes that break the allocation
Most budget mistakes come from mixing up which number answers which question. These are the common ones, each with the check that catches it.
| Mistake | What goes wrong | The check |
|---|---|---|
| Steering by average ROAS | Money flows to lines with a good past, not a good next pound | Compute the marginal return for every line |
| Using the platform's revenue | Brand and retargeting look like the best lines because they collect orders that would have come anyway | Calibrate every curve with a test |
| Mixing bases | A ROAS on gross revenue compared with a breakeven on net revenue | Use one basis everywhere (this chapter uses net revenue) |
| Jumping to the optimum | The curve is extrapolated far beyond the data, and a large jump unsettles the platforms' automated bidding | Move part of the way, within limits, and test |
| Cutting a channel below its threshold | An S curve looks hopeless at a small budget | Test at a budget large enough to reach the steep part |
| Ignoring cash | A profitable budget that the bank account cannot carry | Add the stock to the spend and check the forecast |
| Changing everything at once | No test can tell which change did what | Move lines in different directions in different months |
Example: the mistake Priya nearly made
Before this routine, Priya's plan for spring was to cut Meta by half, because Meta "lost money", and give the £2,500 to Google, which "earned". In practice she would have cut prospecting and retargeting equally. On the curves, that plan moves retargeting from £2,600 to £1,350 and prospecting from £2,400 to £1,150, and adds the money to Shopping and search in proportion. It leaves about £6,012 of contribution. That beats today, because it cuts waste in retargeting, but it falls short of the stepped plan's £6,852 and far short of £8,451, because it also halves prospecting, where the next pound was about to earn the most. The average view could not tell the two halves of Meta apart. The marginal view could.
Conclusion
The question "how do I split my budget" has a precise answer: give every channel the same return on the next pound, and grow the total while that return is above breakeven. The average return cannot tell you this, because it describes money already spent. Draw a response curve per channel, read its marginal return, and move money from lines where the next pound earns little to lines where it earns a lot. Anchor every curve to a test, because platform reports and simple regressions mistake people who would have bought anyway for the effect of the ads. Move in steps that stay close to what the data covers, check the plan against cash, follow the season with the same rule, and repeat it every month. For Wrenfield Home that turns the same £14,000 from £4,271 of contribution into £6,852 next month, and towards £8,451 once the tests confirm the curves.