Skip to main content

Google's open source mixed marketing model library, helps you understand your return on investment and direct your ad spend with confidence.

Project description

About Meridian

Marketing mix modeling (MMM) is a statistical analysis technique that measures the impact of marketing campaigns and activities to guide budget planning decisions and improve overall media effectiveness. MMM uses aggregated data to measure impact across marketing channels and account for non-marketing factors that impact sales and other key performance indicators (KPIs). MMM is privacy-safe and does not use any cookie or user-level information.

Meridian is an MMM framework that enables advertisers to set up and run their own in-house models. Meridian helps you answer key questions such as:

  • How did the marketing channels drive my revenue or other KPI?
  • What was my marketing return on investment (ROI)?
  • How do I optimize my marketing budget allocation for the future?

Meridian is a highly customizable modeling framework that is based on Bayesian causal inference. It is capable of handling large scale geo-level data, which is encouraged if available, but it can also be used for national-level modeling. Meridian provides clear insights and visualizations to inform business decisions around marketing budget and planning. Additionally, Meridian provides methodologies to support calibration of MMM with experiments and other prior information, and to optimize target ad frequency by utilizing reach and frequency data.

If you are using LightweightMMM, see the migration guide to help you understand the differences between these MMM projects.

Install Meridian

Python 3.11-3.13 is required to use Meridian. We also recommend using a minimum of 1 GPU.

Note: This project has been tested on T4 GPU using 16 GB of RAM.

To install Meridian, run the following command to automatically install the latest release from PyPI.

  • For Linux-GPU users:

    Note: CUDA toolchain and a compatible GPU device is necessary for [and-cuda] extra to activate.

    $ pip install --upgrade google-meridian[and-cuda]
    
  • For macOS and general CPU users:

    Note: There is no official GPU support for macOS.

    $ pip install --upgrade google-meridian
    

Alternatively, run the following command to install the most recent, unreleased version from GitHub.

  • For GPU users:

    $ pip install --upgrade "google-meridian[and-cuda] @ git+https://github.com/google/meridian.git"
    
  • For CPU users:

    $ pip install --upgrade git+https://github.com/google/meridian.git
    

We recommend to install Meridian in a fresh virtual environment to make sure that correct versions of all the dependencies are installed, as defined in pyproject.toml.

How to use the Meridian library

To get started with Meridian, you can run the code programmatically using sample data with the Getting Started Colab.

The Meridian model uses a holistic MCMC sampling approach called No U Turn Sampler (NUTS) which can be compute intensive. To help with this, GPU support has been developed across the library (out-of-the-box) using tensors. We recommend running your Meridian model on GPUs to get real time optimization results and significantly reduce training time.

Meridian Documentation & Tutorials

The following documentation, colab, and video resources will help you get started quickly with using Meridian:

Resource Description
Meridian documentation Main landing page for Meridian documentation.
Meridian basics Learn about Meridian features, methodologies, and the model math.
Getting started colab Install and quickly learn how to use Meridian with this colab tutorial using sample data.
User guide A detailed walk-through of how to use Meridian and generating visualizations using your own data.
Pre-modeling Prepare and analyze your data before modeling.
Modeling Modeling guidance for model refinement and edge cases.
Post-modeling Post-modeling guidance for model fit, visualizations, optimizations, refreshing the model, and debugging.
Scenario planning Plan budget allocation with Meridian on Colab & Looker Studio interactively.
Migrate from LMMM Learn about the differences between Meridian and LightweightMMM as you consider migrating.
API Reference API reference documentation for the Meridian package.
Reference list White papers and other referenced material.

Support

Questions about methodology: Please see the Modeling tab in the technical documentation.

Issues installing or using Meridian: Feel free to post questions in the Discussions or Issues tabs of the Meridian GitHub repository. The Meridian team responds to these questions weekly in batches, so please be patient and don't reach out directly to your Google Account teams.

Bug reports: Please post bug reports to the Issues tab of the Meridian GitHub repository. We also encourage the community to share tips and advice with each other on the Issues tab. When our team addresses or resolves a new bug, we will notify you through the comments on the issue.

Feature requests: Please post these to the Discussions tab of the Meridian GitHub repository. We have an internal roadmap for Meridian development, but would love your inputs for new feature requests so that we can prioritize them based on the roadmap.

Pull requests: These are appreciated but are very difficult for us to merge because the code in this repository is linked to Google internal systems and has to pass internal review. If you submit a pull request and we believe that we can incorporate a change in the base code, we will reach out to you directly about this.

Citing Meridian

To cite this repository:

@software{meridian_github,
  author = {Google Meridian Marketing Mix Modeling Team},
  title = {Meridian: Marketing Mix Modeling},
  url = {https://github.com/google/meridian},
  version = {1.6.1},
  year = {2026},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_meridian-1.6.1.tar.gz (414.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_meridian-1.6.1-py3-none-any.whl (491.3 kB view details)

Uploaded Python 3

File details

Details for the file google_meridian-1.6.1.tar.gz.

File metadata

  • Download URL: google_meridian-1.6.1.tar.gz
  • Upload date:
  • Size: 414.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for google_meridian-1.6.1.tar.gz
Algorithm Hash digest
SHA256 318d44dd3d5f0c3808d95f4c8b4b4ef1edfd6847f8f25dd56947a8d1cbe1eb53
MD5 120515ac674708b63a40683fa11119e4
BLAKE2b-256 233e31bcaf248e6e84ae5018b7219184acb5e76ae88d2989eb410e78b3da1baa

See more details on using hashes here.

Provenance

The following attestation bundles were made for google_meridian-1.6.1.tar.gz:

Publisher: publish.yml on google/meridian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file google_meridian-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: google_meridian-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 491.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for google_meridian-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bacf889090ad5c80592c4f33272b782bbb4933badc37b1876d8a19c91f7b18fa
MD5 8bbfb47d8b317a1f8e4ce2830d3bf09c
BLAKE2b-256 9d175956895889f68123a237548f334b3304110de941df34cddacb13b436f5ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for google_meridian-1.6.1-py3-none-any.whl:

Publisher: publish.yml on google/meridian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page