Google Meridian: Bayesian Marketing Mix Modeling
Google Meridian is an open-source marketing mix modeling framework built on Bayesian causal inference, and it is one of the more honest pieces of machine learning tooling Google has shipped for marketers. The short version of what it does: it takes your historical media spend, impressions, and business outcomes, and tells you how much each channel actually contributed to revenue, what your return on investment was, and where the next dollar of budget should go. It is Google’s answer to a problem that has quietly come roaring back into relevance, because the third-party cookies that used to power cheap click-level attribution are going away.
I should be upfront about the bias I bring to this. Most marketing measurement tooling I have seen is either a black box that hands you a confidence-looking dashboard, or a pile of regressions that fall over the moment you ask a hard question. Meridian is interesting because it is transparent, open source, and forces you to state your assumptions explicitly instead of hiding them. That is rare enough in the marketing analytics space to be worth a close look.
Why marketing mix modeling came back from the dead
Marketing mix modeling, or MMM, is an old discipline. It dates back to the era when the only data a marketer had was weekly spend by channel and weekly sales, and the only tool was a regression. It fell out of fashion in the 2010s because last-click attribution looked better: instead of a statistical model, you just watched what someone clicked before they bought and credited that click. It was simple, it was real-time, and everyone understood it.
Two things broke that bargain. The first is privacy regulation and the death of the third-party cookie, which means you can no longer see the full click path for most of your customers. The second is that last-click attribution was always structurally biased toward the bottom of the funnel. It credits the search ad someone clicked right before buying and ignores the brand campaign that made them search in the first place. When you cannot see the clicks at all, you are forced back to aggregate data, and that is exactly the regime where MMM was designed to work.
The revival is not nostalgia. It is a return to a method that works with the data you can actually have: spend and impressions by channel over time, plus a business outcome. No individual-level tracking required.
What Bayesian causal inference buys you over a regression
A naive MMM is just a regression of sales on spend, and it breaks in predictable ways. Media spend is correlated across channels, so the coefficients fight each other. Adstock effects, the idea that an ad’s impact decays over time, need to be modeled or you misattribute. And the whole thing is noisy, because weekly sales bounce around for reasons that have nothing to do with marketing.
Meridian handles this with a Bayesian approach layered on a causal structure. Instead of producing a single point estimate of each channel’s ROI, it produces a posterior distribution, a full range of plausible values with uncertainty attached. That matters a lot in practice, because the honest answer to “what was our ROI last quarter?” is usually “somewhere between 1.5x and 3x, and here is how confident we are in that range,” not a single clean number.
The causal part comes from how the model is structured. Meridian lets you model things like reach and frequency curves, saturation effects, and lag structure explicitly, and it uses controls and priors to separate the effect of marketing from the effect of seasonality, promotions, and other things that move sales on their own. You can also encode prior knowledge, like “we are fairly sure this channel’s effect is positive but small,” which is how you keep the model sane when the data is sparse.
The workflow, end to end
Meridian is a Python framework, and the repo lives at github.com/google/meridian. The typical flow goes like this.
You start with a geo-level dataset: media impressions and spend, plus controls like promotions and seasonality, conversions, population, and revenue, all indexed by geography and time. Geo-level is the default because it gives the model more independent variation to work with than a single national time series, which is often too short to estimate anything reliably.
You install the package, load your data, and specify the model. This is where Meridian differs from a black box: you define the priors, the saturation and lag structure, and the relationships you believe exist. Then you fit it, which is where the GPU support helps, because the sampling that produces those posterior distributions is computationally heavy. The framework is built on top of TensorFlow Probability and JAX, so it will use a GPU if you have one.
Finally you read the output: posterior distributions for each channel’s contribution, ROI curves, and a budget optimization step that tells you how to reallocate a fixed budget to maximize expected revenue. The tutorial ecosystem around this is active, and the docs walk through a full geo-level example rather than leaving you to reverse-engineer the API.
The code itself is approachable if you have any background in Bayesian modeling. The skeleton of a fit looks roughly like this:
import meridian
from meridian.data import load
from meridian.model import model
from meridian.analysis import analyzer, summarizer
# Load geo-level data: spend, impressions, controls, KPI, indexed by geo x time
data = load("marketing_data.csv")
# Specify priors, adstock (carryover) and saturation structure
mmm = model.Meridian(
input_data=data,
media=data.media,
controls=data.controls,
kpi=data.kpi,
prior=model.PriorDistribution(
roi_m=0.5, roi_scale=1.0
),
)
# Sample the posterior (GPU-accelerated via JAX/TensorFlow Probability)
mmm.sample_prior()
mmm.sample_posterior(n_chains=4, n_adapt=500, n_burnin=500, n_keep=1000)
# Inspect response curves, contribution, and budget reallocation
analyzer = analyzer.Analyzer(mmm)
summarizer.summarize(analyzer)
That is illustrative rather than copy-paste-ready, because the exact API has shifted across releases. The point is the shape of the workflow: you do not get a number out of a black box, you sample a posterior and then interrogate it. Every step is visible and every assumption is a parameter you set.
Reading the outputs without fooling yourself
The outputs are only as good as your willingness to check them. A posterior distribution is not a guarantee of truth; it is a statement about what your model thinks given your data and your priors. If your priors were optimistic and your data is thin, the posterior will inherit that optimism.
The practical checks are the same ones you would run on any statistical model. Look at the posterior predictive checks: does the model, when you simulate from it, produce data that looks like what you actually observed? Look at the uncertainty intervals on each channel. A channel whose 90 percent credible interval straddles zero is one you cannot claim moved the needle, no matter how much the point estimate flatters it. And watch the saturation curves, because they tell you where a channel stops being worth more money.
The single most useful discipline is to treat the budget optimizer as a suggestion generator, not an oracle. It will happily tell you to move a large share of spend into a channel where your posterior is wide, and that is not a recommendation so much as a bet you are being invited to place. A good practitioner pairs the optimizer’s output with a business conversation about what you actually know.
Meridian vs the alternatives
Meridian is not the only open-source MMM framework, and it is worth knowing where it sits. The main alternatives are Meta’s Robyn, Google’s own earlier LightweightMMM, and the PyMC-Marketing project.
Meta Robyn is the most popular and the most different in philosophy. It is an R package built on ridge regression with an evolutionary algorithm for hyperparameter search, and it is deliberately designed for speed and accessibility rather than full Bayesian rigor. It gets teams to an answer fast, but the uncertainty quantification is weaker than a true posterior, and the evolutionary optimization can feel like a black box of its own.
LightweightMMM is Google’s predecessor to Meridian, built on Pyro. It is lighter, as the name says, and it is a reasonable choice if you want Bayesian MMM without the full modeling surface Meridian exposes. Meridian is essentially the more mature, more customizable successor, and Google has been steering new work toward it.
PyMC-Marketing is a community project built on PyMC that shares Meridian’s Bayesian philosophy. It is flexible and well-documented, and the two are closer cousins than either is to Robyn. The choice between them often comes down to whether you want Google’s maintained ecosystem and its specific media-effect priors, or the PyMC community’s more general toolkit.
The practical decision tree I would hand a team: if you are an R shop that needs an answer this quarter, start with Robyn. If you are a Python shop that wants honest uncertainty and can invest in modeling, use Meridian. If you want the Bayesian approach but need something more general-purpose, look at PyMC-Marketing. None of them will save you from the fundamental problem that MMM needs enough clean geo-level data and enough judgment to set priors you can defend.
Who should use Meridian, and who should not
Meridian is for teams that have a real analytics function and a genuine need to attribute revenue across channels. If you have someone who can write Python, understands the difference between a prior and a posterior, and will push back on a model instead of accepting its output, this is one of the best open-source tools for the job. It is a legitimate entry in any conversation about the best AI tools of 2026, though it deserves the label of a statistical modeling framework more than an AI tool.
Who should not use it: anyone hoping for a plug-and-play dashboard that produces a number with no effort and no judgment. Meridian requires you to state assumptions, and if you are not willing to do that, you will produce a model whose outputs are mathematically rigorous and practically meaningless. The tool does not remove the hard part of measurement. It makes the hard part visible, which is better, but it does not do it for you.
The takeaway
The most useful thing about Meridian is not any specific feature. It is that Google chose to make a serious, transparent measurement framework open source at the exact moment the industry lost its cheap attribution crutch. That timing is not an accident, and it tells you where marketing measurement is heading: toward models you can inspect, question, and defend, rather than dashboards you have to trust.
For a team that still cannot fully explain where its marketing budget went, the honest move is not to buy another attribution product. It is to sit down with a year of geo-level data, install Meridian, and see whether the model’s answer, with all its uncertainty on display, is better than the story you are currently telling yourself. In my experience it usually is, and usually in a way that surprises someone in the room.