Catalog / Personalisation, Recommendation & Marketing Analytics / REC-005

Marketing mix modelling & attribution

Estimate the causal contribution of each marketing channel to sales using privacy-safe aggregate Bayesian models and experiments, and turn it into budget allocation advice for marketing and finance teams.

Marketers must decide how to split budget across TV, search, social, retail media, influencers and promotions, while cookie loss, consent rules and walled gardens make user-level tracking less reliable. Marketing mix modelling (MMM) fits a Bayesian or regularised regression model on aggregate time series and calibrates it with experiments to estimate each channel's incremental effect, diminishing returns and carry-over. Because it needs no individual-level data, it is the privacy-friendly backbone of measurement in the EU. Output: defensible ROI numbers and an optimised budget split.

Problem & value

  • Today: budgets are split by habit, last-click reports or each platform's own (self-grading) attribution. Last-click over-credits search and retargeting and ignores brand, TV and offline. Consent banners (ePrivacy/GDPR), browser tracking limits and Apple's ATT reduce observable user paths.
  • AI value: MMM measures incrementality top-down from aggregates; experiments (geo holdouts, conversion lift) provide ground truth to calibrate it; optimisation turns curves into a budget plan. Modern open frameworks run in hours instead of the multi-month consulting projects of the past.
  • Benefit evidence: vendor and practitioner case studies report budget shifts and efficiency gains, but numbers differ widely by setup; measure uplift with your own holdout tests instead of trusting generic figures [1][2].

Variants

  • Classic MMM (national, weekly): 2-3 years of weekly data; works for TV, print, OOH and offline.
  • Geo-level MMM: panel by region/DMA; far more statistical power and better identifiability.
  • Always-on / incremental MMM: refresh weekly or monthly via automation, with experiments feeding priors.
  • Multi-touch attribution (MTA) and data-driven attribution: user-path models inside analytics and ad platforms; limited to consented, observable journeys; best combined with MMM ("unified measurement").
  • SMB variant: one or two paid channels, short history: use simple models, lift tests and platform-provided or low-cost tools rather than a full Bayesian build.
  • Private use: not applicable.

How it works

  1. data collection (spend, impressions, outcomes, price/promo, seasonality)
  2. data validation + feature prep (weekly grain, geo panel, control variables)
  3. Bayesian model: adstock (carry-over) + saturation (Hill curve) + trend/seasonality + controls
  4. calibration with priors from experiments (geo-lift, conversion lift, incrementality tests)
  5. posterior inference (MCMC/NUTS or variational)
  6. ROI, mROI, contribution with intervals
  7. budget optimisation under constraints (total budget, channel min/max)
  8. scenario planning + LLM-written narrative
  9. human review (marketing, finance)
  10. decision
  11. next experiment
  • Core model: hierarchical Bayesian regression with media transformations; priors encode what is known (e.g. ROI ranges from past tests). Frameworks differ: Google Meridian models reach and frequency and geo hierarchy; PyMC-Marketing offers flexible components; Meta Robyn uses ridge regression with evolutionary hyperparameter search.
  • Attribution layer: rule-based, Markov/Shapley or ML data-driven attribution on consented first-party journeys, reconciled with the MMM.
  • LLM role (assistive only): explain results, draft scenarios, query model outputs by chat and write executive summaries. The estimates themselves come from statistical models, not from the LLM.
  • Human-in-the-loop: analysts check data, priors and diagnostics (convergence, out-of-sample fit, stability); budget decisions and experiments are approved by marketing and finance leads.

Data preparation

MMM needs two to three years of weekly (ideally daily) series: spend, impressions and reach per channel, sales or orders from the ERP or shop system, plus prices, promotions, holidays and competitor events. In an SMB this data is scattered across ad platform exports, Excel sheets kept by individuals, the ERP and agency reports, often with different calendars, channel names and currencies.

Typical gaps are missing weeks, renamed campaigns, spend booked in invoices but not in platform data, undocumented promotions and no record of past experiments, which are valuable as priors.

Preparation steps: - Inventory sources and owners (see PREP-001, PREP-004) and pull exports through APIs or connectors (PREP-005). - Move spreadsheet histories into one tidy table with a fixed weekly grain (PREP-011). - Fix a channel taxonomy and KPI definitions with marketing and finance (PREP-012). - Log promotions, price changes and tests in a simple calendar. - Only aggregate data is needed, so personal data stays out (PREP-022 if exports contain it).

Tools: Python with pandas, dbt or a warehouse such as BigQuery, or Supermetrics-style connectors. Expect 50 to 70 percent of the project effort to go into data work; the modelling itself is the smaller part. GUIDE-003 offers a readiness checklist.

Implementation paths

Which path for whom

  • smb: Path B, because MMM needs your own spend and sales series and no affordable EU-hosted product fits a small, non-standard channel mix; an agency or freelancer running an open framework is the realistic route.
  • enterprise: Path C, because budget allocation is strategic, the data is commercially sensitive and open frameworks (Meridian, PyMC-Marketing) run in your own cloud tenant without per-seat fees.
  • developer: Path C, because the open frameworks are libraries you adapt, calibrate and version yourself.

Path A — Buy (when no data-science team exists)

  • Measurement platforms and MMM SaaS: Recast, Haus, Measured, Mutinex (AU), Analytic Partners, Nielsen/NielsenIQ, Kantar, Sellforte (FI, EU), Funnel, Supermetrics-fed tools; Adobe, Google and Meta offer built-in measurement. Agencies offer managed MMM.
  • Check: EU hosting and data processing agreement, model transparency (priors, diagnostics), refresh cadence, experiment calibration, export of raw results.
  • Choose A when: several channels, no in-house Bayesian expertise, need results in weeks.
  • Frameworks (open source): Google Meridian (Apache-2.0, Python/TensorFlow Probability, geo-level, reach and frequency, Scenario Planner), PyMC-Marketing, Meta Robyn (R/Python). All run on a normal cloud VM or notebook [3][4][5].
  • Data stack: BigQuery/Snowflake/Databricks or an EU cloud warehouse; dbt for feature tables; connectors (Funnel, Supermetrics, Airbyte) for spend data; Looker/Power BI for dashboards.
  • LLM layer: an EU-hosted or EU-region model (Mistral, Azure OpenAI EU, Vertex AI EU, Claude via EU regions) to narrate and query results; keep numerical results in a structured store.
  • Geo experiments: Google GeoexperimentsResearch or Meta GeoLift to produce calibration priors.

Path C — Self-host (open source)

  • Same frameworks (Meridian, PyMC-Marketing, Robyn) on own servers or Kubernetes; NumPyro/JAX or PyMC backends. Sampling is CPU-bound or benefits from one GPU: HW1 is enough, HW2 speeds up Meridian (TensorFlow Probability) for large geo panels. Optional local LLM (open-weight Mistral, Qwen, Llama class via vLLM/Ollama) for narration. Ops effort: 1-2 data scientists.

Path D — Custom modelling

Build bespoke hierarchical models (e.g. in Stan/NumPyro) for special structures: multi-product cannibalisation, brand-equity long-term effects, retail media, B2B long cycles. Needs 2+ years of consistent data, stable channel mix variation and a statistician; always validate with out-of-sample tests and experiments.

State of the art (2026)

  • Open, Bayesian, calibrated MMM is the mainstream approach: Google Meridian (open-sourced 2025, successor to LightweightMMM), PyMC-Marketing and Robyn are actively developed; Meridian added non-media variables and a no-code Scenario Planner [3][6].
  • Unified measurement: MMM for strategy, experiments for truth, attribution for tactical optimisation.
  • Calibration via experiments is the key quality lever; uncalibrated MMMs can give confident but wrong channel rankings.
  • Agentic analytics: LLM agents run data prep, refits and reporting, but generated numbers must trace to model output.
  • Limits and failure modes: collinear channels (spend moving together), low variation in spend, too short a history, omitted variables (competitors, distribution changes), prior sensitivity, slow-moving brand effects; results are estimates with wide intervals, not facts. Platform-reported conversions overlap and over-count.

Shared resources & combinations

  • Same capabilities (tabular-ml, time-series, causal-inference): PRED-001/PRED-002 demand and sales forecasting, DATA-027 experimentation and causal impact, OPT-016 trade-promotion optimisation.
  • Downstream: OPT-004 dynamic pricing; REC-007 creative optimisation and bidding; REC-013 retail media; REC-003 next-best-action uses channel response insights.
  • Inputs from: REC-004 segmentation (segment-level models), PRED-004 customer lifetime value (long-term ROI).
  • Hardware: HW1 CPU/cloud VM is shared with other tabular analytics workloads.

Effort, cost & KPIs

  • Path A: weeks to first results; subscription or project fees.
  • Path B: typically 2-4 months to a calibrated, automated model including data pipelines; main cost is data engineering and analyst time, compute is modest.
  • Path C/D: 3-6 months; specialist skills needed.
  • KPIs: out-of-sample error (MAPE), posterior interval width, agreement with experiment lift, share of budget moved on model advice, incremental revenue per euro versus a holdout, time from data to decision, refresh frequency.

People & change

Start with management and the department lead (marketing and finance): MMM changes budget decisions, so agree early which decisions the model may inform. Involve data owners (ERP, agencies, ad accounts) when sources are inventoried and IT for connectors and access. The end users are analysts and campaign managers; show them the diagnostics, not only the ranking.

Works council: normally no. The model uses aggregate market data, not employee behaviour, so §87(1) no. 6 BetrVG is not triggered; still inform the council in good time under §90(1) no. 3 if the process changes noticeably. The DPO is needed only if exports contain personal data or first-party journeys feed the attribution layer; then check the legal basis and, with processors, an AVV (GUIDE-005).

Support AI literacy (Art. 4 AI Act) with a short session on what MMM can and cannot say about causality (GUIDE-006). Run a pilot on two or three channels and compare against a past experiment. Typical concerns: "the black box cuts my channel" and mistrust of credible intervals; address them by publishing assumptions and priors, calibrating with lift tests, and treating output as decision support: marketing and finance decide. See GUIDE-008 and GUIDE-009.

Risks, regulation & compliance

  • EU AI Act: minimal risk; aggregate statistical measurement is not an Annex III use. AI literacy duty (Art. 4) applies. Do not use results to build manipulative or exploitative targeting (Art. 5(1)(a)/(b) prohibitions on subliminal or vulnerability-exploiting techniques); MMM itself is not such a technique.
  • GDPR / ePrivacy: MMM on aggregated data is largely outside personal data; geo and user-level attribution, tracking pixels and server-side tagging need a legal basis and consent (ePrivacy Directive Art. 5(3), GDPR Art. 6) [7]. Document purpose, minimise data and avoid re-identification in small geos.
  • Vendor risk: data transfers to US platforms (EU-US Data Privacy Framework), processing agreements, EU hosting preference.
  • Model risk: over-trusting point estimates; mitigate with intervals, backtests, experiments, version control of priors and a change log. Finance sign-off on budget shifts.
  • Self-grading platforms: reconcile vendor-reported results with independent measurement.

Getting started

  1. Collect 2-3 years of weekly spend, outcome and control data in one clean table; document gaps.
  2. Run one geo or conversion-lift experiment on a major channel to get a ground-truth anchor.
  3. Fit a baseline with Meridian or PyMC-Marketing on a sample; check diagnostics and out-of-sample fit.
  4. Calibrate with experiment results, review ROI intervals with marketing and finance, and test a modest (10-20%) reallocation as a measured experiment.
  5. Automate monthly refreshes and add an LLM summary layer once the numbers are trusted.

Sources

  1. Google — Meridian documentation — https://developers.google.com/meridian
  2. Meta — Robyn open-source MMM — https://facebookexperimental.github.io/Robyn/
  3. Google Meridian GitHub repository — https://github.com/google/meridian
  4. PyMC-Marketing documentation — https://www.pymc-marketing.io/
  5. Meta Robyn GitHub repository — https://github.com/facebookexperimental/Robyn
  6. Martech.org — Google releases its open source marketing mix model to all — https://martech.org/google-releases-its-open-source-marketing-mix-model-to-all/
  7. Directive 2002/58/EC (ePrivacy) — https://eur-lex.europa.eu/eli/dir/2002/58/oj
  8. Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj