calendar Last updated: 1 September 2026
2021 10 27 15 00
Data integration
How to's

Facebook Robyn Marketing Mix Modeling: Current Status and Data Setup

Try It Now

Connect your data in 1 min. Free forever plan

Got insights from this post? Give it a boost by sharing with others!

Robyn is Meta’s open-source marketing mix modeling (MMM) package for R. It estimates how much each channel’s spend contributed to revenue or conversions, models diminishing returns, and suggests a reallocated budget. It is still available and still on CRAN.

This guide was originally written against a much older version of Robyn. The package has changed substantially since, so the sections below cover what Robyn is today, how to get your marketing data into the shape it needs, and where the current official instructions live.

Is Robyn still maintained?

Yes, though at a slower pace than in its early years. The official repository is public and not archived, and the package is published on CRAN, where the current version is 3.12.1, published on 2 July 2025. The most recent commit on the main branch also dates from mid-2025.

So Robyn is usable, but it is not moving quickly. If you are choosing an MMM library today it is worth comparing it against Google Meridian, which is under more active development and which we cover in a separate tutorial.

What changed since this guide was written

The original version of this page walked through a fork of Robyn 1.x, sourcing a file called fb_robyn.func.R and calling functions such as f.robyn(), f.inputWrangling() and f.budgetAllocator().

That approach no longer works. Robyn was rebuilt as a proper R package, and those files and functions no longer exist. The current workflow uses four main functions instead:

  • robyn_inputs() defines your data, variables and hyperparameter ranges
  • robyn_run() fits the models
  • robyn_outputs() produces the plots and one-pagers
  • robyn_allocator() runs the budget allocation

Because the API changed this much, we have removed the old code from this page rather than leave a script that cannot run. For the current, maintained walkthrough, use Meta’s own demo script and the Robyn project site.

Getting your marketing data ready for Robyn

The part that has not changed is the data problem. Robyn needs one row per time period, with spend and, ideally, impressions for every channel you want to model, plus the dependent variable you are trying to explain. Assembling that from separate ad platforms is usually the slowest part of an MMM project.

  1. Connect your marketing sources in Windsor.ai. Connect the channels you spend on, such as Google Ads and Meta Ads, and one analytics source such as Google Analytics that can supply the revenue or conversion figure you want to model.
  2. Aggregate to a consistent time grain. Robyn expects daily, weekly or monthly data with no gaps, so fill missing periods with zero rather than leaving them out.
  3. Give every channel its own spend column, and its own impressions column where you have that data.
  4. Keep one column for the dependent variable, either revenue or conversions, and be consistent about which.

Once the data is in that shape, it can be handed to robyn_inputs() directly.

What Robyn produces

Robyn writes out model plots showing each channel’s share of spend against its modelled share of effect, along with response curves showing diminishing returns and how well each model fitted.

Robyn marketing mix modeling output showing spend share against effect share

It then selects a model and produces a reallocated budget based on it.

Robyn budget reallocation output

How to read the results

Treat the allocation as a hypothesis, not an instruction. Two habits are worth keeping:

  • Compare the MMM result against your other reporting rather than taking it in isolation. Where the two disagree, that disagreement is the interesting part.
  • Shift budget gradually and watch what happens. If the observed impact matches the model, continue in that direction. MMM is most useful for channels where impression-level measurement is impossible, which is exactly where you have least ability to verify it directly.

Where to go from here

Windsor.ai brings your marketing sources together into one dataset with consistent field names, which is the input any MMM package needs before it can model anything. Connect your data in 1 minute. Free forever plan.

Get started for free

Access all your data from your favorite sources in one place.
Free forever plan, no credit card

Try It Now

Tired of juggling fragmented data? Get started with Windsor.ai today to create a single source of truth

Let us help you automate data integration and AI-driven insights, so you can focus on what matters, growth strategy.
g logo
fb logo
big query data
youtube logo
power logo
looker logo