
Text written by Fernanda Borém, Senior Data Scientist and Mariane Bando, Data Science Coordinator of the MediaLab team.

Digital marketing lives a paradox: we’ve never had so much data and, at the same time, it has never been so difficult to isolate causal effects. Traditional attribution models capture direct conversions, but leave blind spots: branding campaigns, offline channels, long-term effects, awareness effects.
The fundamental question remains: how to confidently estimate the incremental impact of each channel and decide where to allocate the next million?
This is the account of how we built Bobyn, our proprietary MMM (Marketing Mix Model), and the platform that seeks to democratize marketing mix modeling at iFood.
Before Bobyn, we had a classic causal inference problem: measuring the incremental gain of each marketing channel on business KPIs, performing investment simulations and optimizing budget allocation (whether for sessions, orders or other KPIs). The challenges were predictable, but not trivial:
We tested well-known open-source tools (Robyn, Meridian) and consulted market solutions. The problem wasn’t their technical capacity – in fact, they are excellent – but our context (multiple verticals, varied KPIs, need for fine control) called for a more customized solution:
The choice became clear: building our own MMM would give us control, transparency and the ability to evolve the model alongside the business.

With a well-calibrated MMM, we could answer questions that previously depended on intuition or A/B tests that were difficult or even impossible to perform, for example:
The solution involved two fronts: building a model that encompassed the modeling challenges and making it accessible to the entire company.
Building our own solution in Python, using libraries like PyMC, gave us full control. We opted for Bayesian modeling because it allowed us to go beyond cold numbers:
It’s important to note that our goal is not to bias arbitrarily — it’s to translate marketing knowledge into mathematics.

Simplified model structure:
$$ Y_t = baseline_t + Σ (saturation(adstock(spend_channel_i))) + effects_t $$
where:
A brilliant model in the hands of few has limited impact. That’s why we created an internal platform that allows any business analyst to create their own MMM simply and quickly, adding operational knowledge in a simple way.
What does the platform do?
Unplanned benefit
The platform simplifies model creation, but doesn’t eliminate the need for technical knowledge — and this is intentional. Whenever a new team shows interest, we seek to provide complete onboarding: we explain the methodology, where the numbers come from and how to interpret credibility intervals.
This process became an essential part of the product. We realized that confidence in results doesn’t come only from model accuracy, but from stakeholders understanding why the model suggests a certain allocation. The platform facilitates experimentation, but technical learning remains necessary — and desired.
The result is a robust solution that is expanding throughout the company, far beyond the marketing team. It has become a strategic planning tool.
One of the project’s great supporters was the Branding team, which has been seeking to be increasingly Data-Driven to make investment decisions. Historically, the area has high investments in offline media, so the great pain point has always been: are we investing too much or too little? Furthermore, are we investing correctly?
Using our platform’s optimizer and scenario simulator, the team was able to get answers to these doubts, which allowed them to generate and test new budget allocations between channels, without compromising a single real from the plan.
The result? In September, the team managed to reduce investment by 2% – a very significant number in absolute terms – in some saturated channels while maintaining the total volume of sessions.
Building Bobyn was challenging, but it was worth it. Having full control over the model means we can iterate quickly, add custom features and, most importantly, explain to stakeholders exactly where the recommendations come from.
And this is just the beginning. We’re already exploring the next challenges:
We are calibrating the MMM with geolift test results. The idea is to use incrementality measured via experiments to suggest prior distributions, creating a validation cycle between methodologies.
Over these past months, we also improved our attribution models (MTA), so the next step is to use the MTA model distributions to inform the priors of digital channels in the MMM. This approach is especially useful for channels with low volume of historical data.
Build vs buy is not binary: Tools like Robyn (Meta) and Meridian (Google) are excellent and solve well for many cases. But our context — multiple verticals (food, groceries, pharma), varied KPIs (sessions, orders, GMV, ROI), need to iterate quickly — called for deep customization.
Interpretation > accuracy: Stakeholders trusted the model not only because it had good metrics, but because they understood the logic behind it. Transparency won over complexity.
It’s important to invest as much time in visualizations and explanations as in tuning priors. The contribution charts, saturation and interactive simulations generated more confidence than perfect model diagnostics.
Self-service has limits: The platform accelerated adoption, but technical onboarding remains essential. We don’t want to create poorly configured models, because that generates bad decisions.
About us
Nice to meet you, we are the MediaLab team at iFood! Our job is to build data tools that help media, branding and CRM teams make better decisions: from Bobyn (MMM) to LLM agents for hyper personalization of notifications.
If you work with marketing analytics, experimentation or Bayesian modeling and want to exchange ideas, reach out to us on LinkedIn or comment below!
We are always looking for passionate developers, designers and data scientists to help us revolutionize the food delivery experience. Join iFood Tech and be part of building the future of food technology.
Discover our Careers
How iFood's generative AI connects personalization and communication through rigorous engineering patterns to scale unique user experiences From Grouped Campaigns to Individual Decisions [4:30 PM, Tuesday] Haven't had lunch yet, right? The Mushroom Risotto you love is waiting for you…



In a microservices ecosystem as dynamic and complex as iFood's, ensuring that people and systems have appropriate access to the right resources is a constant challenge. Historically, in most cases, authorization logic is implemented in a decentralized and inconsistent manner…


In this publication, we present how iFood benefited from using a Features Platform, which in addition to simplifying feature management, also provided a robust, efficient infrastructure and mitigated latency problems previously faced in fraud detection and combat. The digital revolution…

Each article is the result of the vision and expertise of our authors. See who contributes to our blog: