Robyn, Meta's Open-Source Marketing Mix Model, Explained

How Meta's open-source Robyn builds a marketing mix model, what it automates, where it needs expert judgment, and how it compares with other options.

Marketing mix modeling (MMM) used to be the preserve of large brands that could pay consultancies to build a model once a year. Open-source tools have changed that. Robyn, released by Meta's marketing science team, was one of the first to put a full MMM workflow in the hands of any team that can run code.

Robyn makes building a model much faster. It doesn't remove the need for good data or for judgment, and knowing where those still matter is the key to using it well.

What Robyn is

Robyn is a semi-automated marketing mix modeling library written for the R programming language. Like any marketing mix model, it relates sales over time to spend or impressions in each channel, and to the outside factors that also move sales, then separates the contribution of each.

Its goal is to automate the decisions a modeler would otherwise make by hand. In Meta's own description of the project:

Robyn aims to reduce human bias in the modeling process, esp. by automating modelers decisions like adstocking, saturation, trend & seasonality as well as model validation. Moreover, the budget allocator & calibration enable actionability and causality of the results.

How the Robyn workflow runs

1. Prepare the data. You supply a time series, usually daily or weekly, with your outcome (sales, revenue or conversions), paid media by channel, organic activity such as email or referral traffic, and other factors like promotions or pricing. This step takes the most time, and Robyn doesn't do it for you.

2. Separate trend and seasonality. Robyn uses Prophet, Meta's open-source forecasting library, to break the outcome into trend, seasonality, holidays and day-of-week effects, so the model doesn't credit media for sales that would have happened anyway.

3. Model carryover and diminishing returns. Advertising keeps working after it runs, and each extra dollar does less than the last. Robyn applies adstock transformations for the first and saturation curves for the second.

4. Tune the model automatically. Choosing how long each channel's effect lasts and where it saturates used to be slow trial and error. Robyn uses Nevergrad, Meta's optimization library, to search thousands of combinations. It scores each one on two goals: how well it fits historical sales, and how plausible its split of credit is compared with how spend was actually distributed.

5. Review the candidates. The search produces a set of strong models rather than one answer. For each, Robyn creates a one-page summary with charts of fit, channel contribution, response curves and carryover. These one-pagers are useful for explaining results to stakeholders, and they're where an analyst decides which model to trust.

6. Calibrate with experiments. If you have lift tests or geo tests, Robyn can use them to steer the model toward results consistent with that experimental evidence. This is one of its more valuable features, because a regression on historical data alone can mistake correlation for cause.

7. Allocate budget. The budget allocator uses each channel's response curve to suggest how to redistribute spend for a given total budget.

8. Refresh. As new weeks of data arrive, you can update the model rather than rebuild it from scratch.

Where Robyn needs help

Robyn automates the mechanics. Several things still depend on the people using it.

  • Data preparation. Pulling consistent spend, impressions and sales across every platform, filling gaps and lining up dates is most of the work in any MMM.
  • Choosing a model. Different candidate models can tell different stories about the same channel. Picking among them requires business knowledge and a willingness to question results that look too good.
  • Channels that move together. If two channels always rise and fall at the same time, no regression can cleanly separate their effects. Robyn can't fix a lack of variation in the data.
  • Validation. A model that fits the past closely may still predict the future poorly. Testing it on periods it hasn't seen is the best check, and it's up to the team to do it.
  • Staying current. Refreshes are possible, but someone has to run them, check them and act on them.

Robyn is open source, so anyone can inspect its code. Even so, because Meta also sells advertising, many teams prefer to back up any model's view of a single platform with independent evidence, such as experiments or a second measurement approach.

Robyn compared with other options

Teams that want MMM generally choose among a few paths:

  • Open-source packages. Robyn, Google's Meridian and PyMC-Marketing are free and transparent. Meridian and PyMC-Marketing take a Bayesian approach, which builds in prior knowledge and reports uncertainty directly. All of them require data science skills and ongoing staff time.
  • Commercial statistical software. Tools such as SAS give experienced modelers more control, with license and infrastructure costs.
  • Consultancies. They provide expertise and custom models, but traditionally at a high price and with infrequent updates.
  • Managed measurement platforms. These handle the data connections, modeling and refreshes, and deliver results to marketers who don't run models themselves.

The right choice depends less on the algorithm than on whether you have the people to feed, check and refresh a model every week.

The bottom line

Robyn brought serious marketing mix modeling within reach of teams that could never have afforded it before, and its emphasis on calibration with experiments points in the right direction. But it is a toolkit, not a finished answer. Teams with strong in-house analysts can get a lot from it. Teams without them should weigh the true cost of data preparation, model selection and upkeep before deciding that free software is the cheapest route. For how MMM fits alongside click-based measurement, see our comparison of multi-touch attribution and marketing mix modeling.

Frequently asked questions

What is Robyn?

Robyn is an open-source marketing mix modeling package created by Meta's marketing science team. It estimates how much each marketing channel contributes to sales, accounting for carryover, diminishing returns, trend and seasonality, and it includes a tool that suggests how to reallocate budget.

Is Robyn free to use?

The software is free and its code is public. The real costs are the people and time needed to collect and clean the data, run and select models, and keep them updated.

Does Robyn only measure Facebook and Instagram?

No. Robyn models any paid channel you give it data for, such as search, TV, connected TV or TikTok, along with organic and non-marketing factors. The quality of the result depends on having consistent data for every channel that matters.

How does Robyn choose the best model?

It doesn't choose a single one. Robyn searches thousands of model settings and returns a set of strong candidates that trade off statistical fit against how plausible the results are. An analyst then reviews them and picks the one that best reflects the business.

What are the alternatives to Robyn?

Other open-source options include Google's Meridian and PyMC-Marketing, both of which use Bayesian methods. Beyond open source, companies can use commercial statistical software, a consultancy, or a managed measurement platform.

Free Download

The 2027 Attribution Playbook.

A practical field guide for proving impact when the cookie is gone, the click is weaker, and finance needs one answer. Includes examples from retail, CPG, financial services, and subscription brands, plus the frameworks behind a finance-ready measurement rollout.

  • → Why spike-based TV attribution broke — and what replaced it
  • → The halo effect on Amazon, Walmart, Target, and Chewy
  • → How to align Finance and Marketing on one source of truth
  • → A practical framework for validating incremental lift
Download the playbook →
2027
Attribution Playbook

Proving Impact in a Cookie-less, Click-less World

A field guide for marketing leaders who need to defend every dollar.