Skip to content

Attribution

Marketing mix modeling for Shopify: is your brand ready for MMM?

MMM estimates what each channel adds to sales from your spend and sales history, with no tracking. Here is how it works, when it's worth it, and where survey data helps.

Yforms team, Product & growthPublished 8 min read

On this page

Marketing mix modeling for Shopify brands means using your own history of ad spend and sales to estimate how much each channel really adds, without pixels or click tracking. It's become popular again since privacy changes made tracking less complete, and because Meta and Google have released free, open-source MMM tools. This guide explains what MMM does, when a Shopify brand is big enough to get value from it, what Robyn and Meridian actually are, and how post-purchase survey data helps you build and check a model.

What marketing mix modeling is

A marketing mix model is a statistical model of your sales over time. It takes weekly (or daily) sales and lines them up with weekly spend on each channel, plus things that move sales without being marketing: seasonality, holidays, price changes, promotions, stock-outs. Then it estimates how much of the sales each input explains.

The output answers questions like these:

  • Contribution: how many sales each channel drove last quarter, compared with the sales you'd have had anyway (the baseline).
  • Return per channel: revenue added per dollar spent, at your current spend.
  • Diminishing returns: how quickly each channel stops paying back as you spend more. Models call this a saturation curve.
  • Carryover: how long a channel's effect lasts after the money is spent. Models call this adstock. TV and podcasts often carry over longer than search ads.
  • Budget mix: how to split next quarter's budget to get more sales for the same spend.

How MMM differs from attribution

Two different ways to measure marketing
Click attributionMarketing mix modeling
DataIndividual clicks and ordersWeekly totals of spend and sales
Needs trackingYesNo
Sees offline and untracked channelsNoYes, if you feed in their spend
SpeedDailyUsually refreshed monthly or quarterly
Good forOptimizing ads inside one platformSetting budgets across channels

MMM is a top-down view. It can't tell you which ad set to pause tomorrow. It can tell you whether Meta deserves 60% of next quarter's budget or 40%. For the day-to-day view and how it falls short, see our guide to Shopify marketing attribution.

When a Shopify brand is big enough for MMM

MMM learns from variation. If your spend on each channel was roughly the same every week for two years, the model has nothing to learn from. And if your total sales are small, normal week-to-week noise drowns out the effect of any one channel. So the question isn't just revenue. It's whether your data has enough signal.

A rough checklist, from our own experience and common practice. Treat it as a guide, not a rule:

  • History: about two years of weekly data, so the model sees each season more than once. Less is possible, but the estimates get wide.
  • Several channels with real spend. If 95% of your budget is Meta, you don't need a model to tell you where the money goes. MMM earns its keep when you spend meaningfully on three or more channels.
  • Variation in spend. Weeks where you spent more on one channel and less on another. Planned tests, pauses and launches all help.
  • Enough sales. Weekly sales big enough that a change in one channel's spend shows up above the noise.
  • Clean inputs. Spend by channel by week, sales by week, and a list of promotions, price changes and stock problems.
  • Someone to run it. The open-source tools are free, but they need a person who can work in R or Python and read the output critically.

For an illustration: a $40k/month brand spending almost all its budget on Meta usually isn't ready. A $400k/month brand spending on Meta, Google, TikTok, podcasts and creators, with two years of history, probably is. Between those, it depends on how varied your spend has been.

The open-source tools: Robyn and Meridian

You no longer need a consultancy to build an MMM. Two large open-source projects, one from Meta and one from Google, are free to use. A third, from the PyMC community, is also widely used.

Robyn, from Meta

Robyn (opens in a new tab) is an MMM package from Meta's marketing science team, written mainly in R, with a beta Python wrapper that still needs the R package. It fits ridge regression models, models adstock and saturation for each channel, and uses an evolutionary algorithm (Meta's Nevergrad library) to search many candidate models. You then choose among the best ones. It includes a budget allocator, and its documentation (opens in a new tab) describes calibrating models against ground-truth results such as geo tests and lift studies. The project says it is especially suited to digital and direct response advertisers with rich data, which describes many Shopify brands.

Meridian, from Google

Meridian (opens in a new tab) is Google's open-source MMM framework, written in Python. It is Bayesian: you give the model prior beliefs, such as a likely return range for a channel, and it updates them with your data. It can model data at the geographic level when you have it, can use reach and frequency data, and is designed to be calibrated with experiments and other prior information. Google recommends running it with a GPU. The Meridian documentation (opens in a new tab) covers data preparation in detail.

PyMC-Marketing

PyMC-Marketing (opens in a new tab) is a Bayesian marketing toolkit in Python, built on the PyMC library, and includes an MMM. It's a common choice for teams already working in Python.

Open-source MMM tools at a glance (check each project for current features)
ToolMade byLanguageApproach
RobynMetaR (Python wrapper in beta)Ridge regression, many models, you choose
MeridianGooglePythonBayesian, with priors and geo-level option
PyMC-MarketingPyMC Labs and communityPythonBayesian

There are also paid MMM products and services built for ecommerce. They handle the data work and the modeling for you. Whether that's worth it depends on whether you have someone in-house who can run the open-source tools well.

How post-purchase survey data helps MMM

MMM and post-purchase surveys look at the same question from opposite ends. The model works from totals and correlations. The survey asks individual buyers what brought them. Each covers the other's weak spots.

1. Measure channels with no spend line

MMM can only credit channels you feed in. Word of mouth, organic creator posts, press mentions and unpaid podcast mentions have no spend, so they end up in the baseline. A how did you hear about us survey gives you a weekly count for these. Some teams add that count as a control variable, so the model doesn't credit a word of mouth surge to whatever paid channel happened to rise that week.

2. A sense check on the output

If the model says podcasts drive 2% of sales and 15% of new buyers say they heard you on a podcast, one of them is wrong. Usually that's a sign to look harder: perhaps podcast spend never varied enough for the model to see it. The survey doesn't override the model, but a big disagreement tells you where to dig.

3. Inform priors, carefully

Bayesian tools like Meridian let you set priors. Survey data can help you set sensible ranges, for example to stop a model from claiming a channel has almost no effect when a steady share of buyers name it. Be careful here. Survey answers measure what people remember, not incremental lift, and experiments are the stronger source for calibration. Use survey shares to set wide, honest ranges, not tight ones.

4. Fill the months between model runs

Models are usually refreshed monthly or quarterly. Survey answers arrive every day. If the share of buyers naming TikTok doubles in three weeks, you know something changed long before the next model run.

Getting started: a 90-day plan

  1. Weeks 1 to 2: collect the data. Weekly spend by channel from each platform, weekly sales and new customers from Shopify, and a calendar of promotions, launches, price changes and stock-outs.
  2. Weeks 1 to 2: put the survey live if it isn't already, so you start building a weekly series of what buyers say.
  3. Weeks 3 to 6: build a first model in Robyn, Meridian or PyMC-Marketing, or brief a partner. Expect the first version to look odd. That's normal.
  4. Weeks 6 to 8: check it against what you know. Compare channel shares with survey shares and with any lift tests you've run. Investigate big gaps.
  5. Weeks 8 to 12: run one planned test. Raise or cut one channel's spend for a few weeks, ideally in some regions only. This creates the variation the next model needs.
  6. Then refresh quarterly, and move budget in steps, not all at once.

Common MMM mistakes

  • Leaving out promotions. A Black Friday week with a big discount and big spend will make every channel look brilliant unless the model knows about the discount.
  • Too little history. One year of data gives one example of each season. The model can't tell a seasonal rise from a channel's effect.
  • Spending the same every week. No variation means no signal. Plan some.
  • Trusting one model run. Small changes in settings can shift results a lot. Look for conclusions that hold across several reasonable versions.
  • Treating it as the only truth. MMM is one lens. Use it with platform data, experiments and what your customers say.

Questions

Is MMM worth it for a small Shopify store?

Usually not yet. With one main channel and steady spend, a post-purchase survey and platform data tell you most of what a model would. Start logging weekly data so you're ready later.

Are Robyn and Meridian free?

Yes, both are open source and free to use. The cost is the time and skill to prepare data, run the models and interpret them.

Can survey data replace MMM?

No. Survey answers show what buyers remember, not what each dollar added. They work best together: the survey covers untracked channels and fast changes, the model covers budget splits.

How often should I refresh an MMM?

Most teams refresh monthly or quarterly. More often rarely helps, because weekly data changes slowly.

Start free on Shopify

Hear from every customer after they buy.

Yforms asks one short question on your thank-you page, when the order arrives and after use. Free for up to 200 orders a month, and every new store gets 14 days of Growth.

Keep reading