Back to Blog
Advanced Attribution

Marketing Mix Modeling for E-Commerce: What It Is and When It Helps

P
Peilt Team
November 12, 20268 min read

Marketing mix modeling (MMM) answers a question that click tracking cannot: if you had spent more, or less, on a channel, what would have happened to your sales? This article explains the idea in plain terms, what data a model needs, where it breaks down, and how it relates to multi-touch attribution (MTA). It is the foundation article; for how Peilt applies it, see the MMM in Peilt guide.

What is marketing mix modeling?

MMM is a statistical method. You give it a time series of your marketing inputs (spend per channel, sometimes impressions) and a time series of an outcome (revenue or orders), usually per week. The model estimates how much of the outcome moves together with each input, while accounting for things that are not marketing: seasonality, promotions, price changes, holidays.

The key difference to click-based attribution is the unit of analysis. MTA follows individual customer journeys and splits credit across the touchpoints it observed. MMM never looks at a single person. It looks at totals per period, so it does not need cookies, device IDs or any user-level tracking. That is why it comes back into focus whenever tracking gets harder.

The building blocks of a model

Modern MMM implementations share a few ideas, explained in general terms below. Common open-source frameworks include Meridian (Google), Robyn (Meta) and PyMC-Marketing; see their documentation for how each one implements them.

Adstock: advertising keeps working after the spend

A video ad seen on Monday can still influence a purchase on Friday. Adstock (also called carry-over) models this by letting each week's effect decay gradually instead of ending immediately. Fast-moving channels like search decay quickly; awareness channels decay more slowly.

Saturation: the tenth euro does less than the first

Doubling the budget rarely doubles the result. Saturation (diminishing returns) is a curve that flattens as spend grows. It is what lets a model say "this channel still has room" or "this channel is close to its ceiling".

Controls: everything that is not paid media

Sales also move because of Black Friday, a price change, a stock-out or a viral post. If these are left out, the model credits the nearest marketing channel instead. Good models include them as control variables.

Uncertainty

Bayesian MMMs return a range of plausible values per channel instead of a single number. That range matters: a channel estimate with a wide range is a hint, not a verdict.

What data you need

  • Enough history. A model needs many weekly observations to separate channel effects from noise. There is no universal minimum; the more channels you run, the more weeks you need.
  • Spend per channel and period. Imported from your ad platforms or finance data.
  • An outcome series. Revenue or orders per period, ideally split by what you actually want to grow (for example new customers).
  • Controls. Promotions, price changes, seasonality, anything that moves sales without being paid media.
  • Variation. If a channel's spend never changes, the model cannot learn what changing it does.

Where MMM falls short

MMM is not a more accurate version of attribution. It answers a different question with different weaknesses.

  • It is slow. Weekly data and a long history mean it describes how channels behaved over months, not what happened yesterday. It is a planning tool, not a daily dashboard.
  • It is coarse. It works at channel level. It cannot tell you which campaign, ad set or creative worked, and it cannot explain a single order.
  • It needs variation. A channel with flat, always-on spend is hard to measure, because the model never sees what happens when the spend changes.
  • Correlated channels blur. If two channels always ramp up together, for example during every sale, the model struggles to tell them apart.
  • Assumptions shape the answer. Choices about adstock, saturation and priors influence the result. Two reasonable setups can disagree.
  • Small shops have less to work with. Few channels, low volume and short history all widen the uncertainty.

Because of this, treat an MMM result as one piece of evidence to be checked against others, such as holdout tests, geo experiments, or customer surveys.

MMM vs multi-touch attribution

Multi-touch attributionMarketing mix modeling
InputIndividual journeys and touchpointsWeekly totals per channel
QuestionWhich touchpoints were on the path to this order?How much does each channel add to sales at a given spend level?
GranularityOrder, campaign, ad, landing pageChannel
SpeedDailyWeekly to monthly, needs long history
Blind spotAnything not tracked: untracked visits, offline, dark socialDetail below channel level; needs spend variation
Typical useDay-to-day optimizationBudget allocation between channels

They are complements. MTA shows what happened inside the journeys you can see. MMM tests whether the channel-level picture those journeys paint holds up statistically. When the two disagree on a channel, that is a reason to look closer, not a reason to pick a winner. For the basics of journey-level credit, read What is multi-touch attribution? and Attribution models explained.

How Peilt uses MMM

Peilt runs a Bayesian marketing mix model on top of the same data as its attribution reports. These are its settings:

  • The model is built with the open-source PyMC-Marketing library, with adstock and saturation transformations. The defaults are geometric adstock and a logistic saturation curve; other variants can be configured.
  • It is trained weekly and needs at least 26 weeks of history for your shop. Below that, no model is fitted yet.
  • The default training target is new-customer revenue, not total revenue. Returning customers often come back because of earlier marketing, so counting them would credit today's channels for yesterday's work.
  • A channel needs spend in at least 5 weeks to enter the model.
  • Peilt also sets a prior per channel type, which is a starting assumption the data can move.
  • Results feed the MMM attribution model, which splits each order between channels in proportion to what the model measures. Until a model exists, MMM behaves like Linear.

The same model also feeds Omni, Peilt's evidence-weighing model. Omni unlocks after 26 weeks of data and a successful MMM run that measured at least 3 channels, and it pulls credit for new customers toward what the mix model measures. You can read how this works in Marketing Mix Modeling in Peilt.

A sensible way to use MMM results

  1. Compare, don't replace. Put the MMM channel shares next to your attribution numbers. Large gaps are the interesting rows.
  2. Look at ranges. Do not move budget on a channel whose estimate is wide.
  3. Test the surprises. If the model says a channel is saturated, reduce its budget in a controlled step and watch total sales, not just that channel's reported revenue.
  4. Re-check regularly. The estimate reflects the past months. Seasons, offers and platform changes shift it.
  5. Ask customers too. A post-purchase survey is a cheap second opinion, see Post-purchase survey attribution.

Summary

MMM estimates the effect of each channel from aggregate weekly data, with no user-level tracking. It is useful for channel-level budget questions and weak for campaign-level questions and short histories. Multi-touch attribution answers the journey-level questions MMM cannot. Used together, each covers the other's blind spot.

Share this article:

Ready to See Where Your Revenue Really Comes From?

Follow customer journeys across your online channels and decide where to move budget.

Join the Waitlist
Works with every Shopify plan that has a theme
15 attribution models
Ad, affiliate and email costs in one place