Marketing Mix Modeling for eCommerce: What It Needs to Work

TL;DR

  • Marketing mix modeling estimates how much each channel contributed to sales using weekly totals. No cookies, pixels or user IDs.

  • Google asks for two years of weekly regional data, or three years national, to run its own model.

  • What decides it isn't your revenue. It's weeks of clean history, channel count, and whether your spend moved.

  • The number the model explains is your total net revenue. Shopify's "sales attributed to marketing" figure is the wrong input.

  • Below the threshold, regional holdout tests and a weekly blended efficiency number do the same job for far less.

Altin Gjoni

Written by Altin Gjoni

14 min read

Marketing Mix Modeling for eCommerce: What It Needs to Work

Marketing mix modeling, usually shortened to MMM, takes weekly totals for sales and media spend and estimates how much of the sales each channel caused. It's back in eCommerce because the user-level tracking that replaced it stopped working well.

It also has an entry requirement most write-ups skip, so that's where this starts.

What this article covers

  • Why channel reporting stops adding up

  • What marketing mix modeling measures

  • How much data marketing mix modeling needs

  • Marketing mix modeling alternatives

  • How to build the dataset in Shopify

  • Turning marketing mix modeling into budget moves

Why channel reporting stops adding up

What you are seeing

What is behind it

Where this article covers it

Channel ROAS adds up to more revenue than your store took

Every platform claims the same order

What marketing mix modeling measures

Platform numbers move when you changed nothing

Part of the conversion count is modeled rather than observed

What marketing mix modeling measures

You pause a channel and total revenue barely moves

Reported conversions overstate incremental conversions

What to measure instead of marketing mix modeling

Shopify, GA4 and your ad platforms all report a different number for the same week

Different attribution rules and lookback windows

How to build the dataset in Shopify

 

Three bar lengths for one week of trading, from platform totals down to estimated incremental revenue.

The disagreement is easy to see once you put two sources side by side.

A seven-day window in GA4 next to the same window in the Shopify admin.

Two things drive that gap. Google reports modeled and observed conversions in the same column, modelling them wherever ad attribution can't be seen directly, so the number you rank channels on is partly an estimate from the party being ranked. And some demand never carries a usable click. 

Our study of 73 stores and 96 million sessions found AI assistant referrals converting 25% better than Google organic on the median store, a source almost nobody had a reporting line for a year earlier.

One correction while we're here, because most MMM writing still leads with it. Google dropped the cookie phase-out in July 2024, dropped the choice prompt in April 2025, and retired most of the Privacy Sandbox in October 2025.

Third-party cookies are still in Chrome. The signal loss is real, it just came from iOS App Tracking Transparency, consent rules and browser restrictions.

What marketing mix modeling measures

Each row of the dataset is one week, carrying total sales and total spend per channel, plus the other things that move sales. What separates it from simply comparing spend against sales is that it allows for two things a straight comparison can't.

Carry-over. Spend keeps working for a few weeks after it lands:

adstocked spend (week t) = spend (week t) + decay × adstocked spend (week t − 1)

One week of spend and the decaying effect a model assigns to the weeks after it.

Diminishing returns. The tenth thousand dollars does less than the first.

The saturation curve, and the point past which each extra dollar returns less than the last.

The output is four numbers per channel:

Output

What it tells you

Contribution per channel

How much of the week's sales each channel explains

Marginal return

What the next dollar in that channel is likely to return

Baseline

Sales you would have made with no media at all

Saturation point

Where more spend in a channel stops paying

Baseline matters most. It's the revenue brand, repeat purchase and organic demand produce on their own, and it's the half of the picture channel reports never show you.

It's also the only way to measure anything that doesn't produce a click. TV, podcast reads, out-of-home, influencer gifting and retail distribution all leave a mark on weekly sales and nothing in a pixel. If much of your budget goes there, the case for a model is stronger than the data test alone suggests, because the alternative isn't worse measurement, it's none.

Does your store have enough data for marketing mix modeling

Google publishes minimums for Meridian, its open-source MMM:

Model type

Minimum history

Geo-level, weekly data

2 years

National-level, weekly data

3 years

Monthly data only

3 years

Weekly is the recommended grain. Google warns that monthly data can fail to settle on an answer, or return ranges too wide to use.

The reason is counting. Every channel adds moving parts the model has to work out, carry-over and diminishing returns at minimum, on top of trend, seasonality and controls. Each one needs data behind it, and Google puts numbers on what that means:

Google's worked example

Data points per moving part

Google's verdict

2 years weekly, national, 26 moving parts

4

"Too low to estimate the model reliably"

3 years weekly, national, 10 moving parts

about 15

"You might be able to glean some directional information"

Read that second row twice. Three years of weekly data on a deliberately simple model buys directional information and no more. That's the ceiling for a national model, and it's why splitting sales by region matters.

A region is not a country. Google's own example data uses New York, Chicago, Los Angeles, Washington and Portland. A US-only store can split orders by state or DMA and get a regional model out of the same two years of trading. The gain is real but not a clean multiplication: Google is explicit that regional time points aren't independent, and a regional model carries its own per-region moving parts.

The four checks, with the threshold for each.

Fail two of those four and the output will look like measurement without being any.

Three stores, and whether marketing mix modeling fits them

Illustrative profiles rather than client data, though the shapes are common.

  • A $2M skincare brand. 

Five channels, 14 months of clean history since a replatform. About 61 weekly data points against 17 moving parts, under four each, the ratio Google calls too low to estimate reliably.

No model. Nothing is wrong with the business, there's just not enough history yet. Run holdouts on the two biggest channels and start the weekly sheet.

  • A $12M apparel brand. 

Six channels, three years of clean history, US only. National totals give about eight data points per moving part, short of the fifteen where Google says you might get directional information. But the brand ships to all fifty states and can split both sales and ad spend by DMA.

Model it, regionally. The split is what makes it work, not the revenue.

  • A $6M supplements brand. 

Four channels, two years of history, splits cleanly by region, and a budget that has sat at the same weekly number for eighteen months. 

Not yet. If spend never moved, the model has nothing to learn from about what moving it would do. Vary the budget for a quarter, then model. Enough data and still no answer, because nothing in the history ever changed.

Scale matters in one respect, which is what a wrong answer costs you. 

Take a store spending $80,000 a month. If the split across channels is 20% wrong, that's $16,000 a month aimed at the weaker option and $192,000 over a year. The money isn't lost, it's just working less hard than it could, and the gap between those two is what pays for the measurement. Run that arithmetic on your own spend before anything else here.

What to measure instead of marketing mix modeling

Most Shopify stores reading this will fail the readiness test, so this section comes before the build. If you cleared the bar, skip to the dataset.

Published entry points are usually framed as media spend rather than revenue, somewhere between $50,000 and $100,000 a month depending on who you ask. Treat those as a proxy for the real gate, which is whether spend is spread across enough channels, and moved around enough, to leave a trace.

Three data positions and the measurement that fits each.

Three things cover most of what a model would have told you:

Instead of

Run

What it answers

Channel contribution

A regional holdout, one channel at a time

Did this channel cause the sales, or just get credited for them

Budget splits

A weekly blended efficiency number, total spend against total revenue

Is the whole machine getting cheaper or dearer to run

A saturation curve

A deliberate step up or down in one channel's budget

Where this channel stops paying

Run them in that order. The holdout answers the question in front of you, the blended number keeps you honest between tests, and the budget step gives a future model something to learn from.

Google now publishes Meridian GeoX for exactly this, under the same open-source license as Meridian itself. It designs the regional test, analyses the result, and feeds that result back in as a prior when you do eventually build a model. Running the tests first and the model second is the right order anyway, and this makes the first half reusable.

And start the weekly sheet today, whatever else you do. Exporting spend and revenue into one place from now on means you're two years from a model rather than permanently two years from one. It's the cheapest thing here and the most often skipped.

How to build the dataset in Shopify

One row per week per region. The Shopify side comes out of two reports and needs no app.

Column

Source

Week starting

Your calendar, one consistent week start

Region

Shopify sales reports, grouped by shipping region

Net revenue

Shopify sales reports, grouped by week

Orders

Same report

Average order value

Same report

Spend per channel

Each ad platform, one column each, split by region

Impressions or clicks

Each ad platform

Promotion weeks and discount depth

Your promo calendar

Price changes

Your own records, a flag is enough

Out-of-stock weeks

Inventory reports, a flag is enough


Three weeks of the dataset, with the source of each column above it.

 Open the sales report, set the range to your full history, group by week and export. Net sales already deducts discounts and returns, which is the figure you want. Then pull the same thing grouped by shipping region, because that regional split is what lifts a borderline dataset into a usable one.

Region-level ad spend comes from the platforms. Meta and Google both break spend down by state or DMA, and your sales split has to match whatever geography you pull there.

Pick the outcome before you build. Net revenue is the usual choice. Use new-customer revenue instead if repeat purchases are a large share of sales, or orders weighted by gross profit if margin varies a lot across the catalogue. Whichever you pick stays fixed for the life of the model.

Split brand and non-brand search. Paid brand search picks up demand your other channels created. Left as one column it absorbs credit that belongs elsewhere and comes back looking like your best performer.

Weekly net sales grouped by week in Shopify's sales report 

Shopify's channel performance reporting offers five attribution models: last non-direct click, last click, first click, any click and linear. Any click credits every clicked channel in full, so its totals can exceed your order count. Read it for context and keep it out of the dataset, because feeding click-attributed revenue into an MMM fits the model to the system you built the model to replace.

The attribution model selector in Shopify's channel performance report 

Open-source MMM compared with buying a vendor model

Tool

Maintainer

Language

Notes

Meridian

Google

Python

Bayesian, geo-level by design, publishes its data requirements openly

PyMC-Marketing

PyMC Labs

Python

Apache 2.0, version 1.3.0 released October 2026, calibrates against lift tests

Robyn

Meta

R

Still open source and still runs, though AdExchanger reported in July 2026 that Meta has scaled back the team behind it. No formal discontinuation

All three cost nothing to license. The cost is a person who can read the output. Fitting a model takes days, and reading one without over-claiming is the part that takes experience. Most open-source projects stall there rather than at the build.

Several paid platforms install as Shopify apps and pull order data straight from your store. That removes the export work, not the data requirement above.

Compare vendors on four things: rebuild frequency, whether an analyst walks you through each rebuild, whether lift tests feed back in as calibration, and what adding a channel does to the price.

My own view, after watching a few of these go in: if nobody on your team can explain what a credible interval is, buy the model with the analyst attached or don't buy one at all. A team that reads estimates as exact figures will make worse calls than it did on platform ROAS.

How to check whether the model is telling the truth

Whoever builds the model should be able to answer these without hesitating. Google publishes its own health checks for Meridian, and the first three below are those checks in plain terms.

Ask for

What a good answer looks like

Did it converge

Yes, with the R-hat figure under 1.2. Above that the model hasn't settled and the numbers are not stable

Is the baseline positive

Yes. A model that says your sales would have been negative without ads is over-crediting the ads, and Google treats a likely negative baseline as a fail

Does the model reproduce your actual total

Yes, within its predicted range. If it cannot reproduce the revenue you already know you made, it won't predict the revenue you haven't

How wide is the range on each channel

Narrow enough to act on. A channel reported at 2.1 with a band of 0.5 to 6.8 hasn't been measured

Does it match a real experiment

The estimate for a channel lines up with a measured regional holdout

The last one carries the most weight. A model validated only against its own history is validated against nothing.

Turning the output into a budget decision

A model nobody acts on is an expensive report. The decision rule is simple: move money from channels with a low marginal return to channels with a high one, in small steps, until the marginal returns are roughly level.

IA store spending $80,000 a month gets these back:

Channel

Monthly spend

Marginal return on the next dollar

Meta

$40,000

$1.60

Google non-brand

$18,000

$3.10

Google brand

$12,000

$2.90

TikTok

$10,000

$1.40

Meta has the biggest budget and the second-weakest next dollar. Non-brand search has the strongest. Move $6,000, about 8% of the budget, from Meta into non-brand search, leave the rest alone, and look again at the next rebuild.

Two rules.

  • Move in single-digit percentages, because the saturation curve behind those numbers was fitted on the range you've already spent in and a big jump lands outside it.
  • Never cut a channel to zero on a model's say-so without running a regional holdout first.

What this will not do. It works at channel level, so it can't tell you which creative or campaign to cut. It rebuilds on a quarterly or monthly cycle, so it's useless for a decision you need on Tuesday. And it describes a range, never a point. Platform reporting keeps its job for the daily work.

Where to start with marketing mix modeling

  1. Count your weeks of clean history and your channels, and check whether you can split sales and spend by region. That answer decides everything else.

  2. Build the dataset for whatever history you have, starting today either way.

  3. Run a regional holdout on your largest channel.

  4. Clear the bar before you buy anything, and fit a model yourself first so you know what you're buying.

If the inputs are the blocker rather than the method, that's the work our eCommerce analytics team does first.

FAQs on marketing mix modeling

Who runs the model, and how long does the first build take?

Budget six to eight weeks for a first build, and expect most of it to go on assembling and cleaning the weekly dataset rather than on modeling. The fitting itself is a few days. One analyst with Python or R can do it, as long as someone owns the data pipeline afterwards.

Can it tell me what to spend next quarter, or only explain last quarter?

 Both, with different confidence. Contribution estimates describe the period the model was fitted on. Budget recommendations extrapolate from the saturation curves, so treat them as a direction to move spend and re-check against a holdout test before any large reallocation.

What happens when we launch a new channel?

It has no history, so the model can't estimate it until several months of varied spend exist. Until then it sits in the baseline and quietly inflates it. Run the new channel as a regional test instead and bring it into the model at the next rebuild.

Do subscriptions or a high repeat rate break the model?

They don't break it, but they distort the read if you model total revenue alone. Subscription renewals are mostly baseline, so a store with a large subscriber base sees a high baseline and small media contributions. Model

What if my store is highly seasonal?

The model controls for seasonality, but it needs enough history to tell a seasonal peak from a media effect. Two Q4s in the data is the practical minimum, which is another reason the two-year figure keeps appearing.

Altin Gjoni

Content Strategist

Altin Gjoni is a Content Strategist who creates in-depth, actionable content for Shopify and eCommerce merchants. With a background in digital strategy and hands-on experience across multiple industries, he turns complex eCommerce challenges into clear, practical guides that help brands grow, convert, and compete.