如何借助 Claude Code 以 100 美元成本构建营销组合模型(MMM)
You Can Build an MMM for $100
营销人员可以通过订阅 100 美元档位的 Claude Code 等编码智能体,运行 Google Meridian、Meta Robyn 等开源代码库来低成本搭建营销组合模型(MMM)。
文章给出了利用编码智能体运行开源营销组合模型的完整数据准备与实操流程,降低了中小品牌搭建归因模型的成本门槛。
Your brand search crushes it, but the client says some of the sales were going to happen organically anyway.
They want you to feed the funnel with listicles and advertorials using cold search. But the ROAS is poor there.
So you’d like to bring some data about which strategy to run a holdout test on and why. After the holdout test, it’d be nice to put the lift test results in some kind of performance brain that can re-contextualize all the channels.
That’s where you want a Marketing Mix Model (MMM). An MMM is a math equation that looks at the rhythm of your spend and reach across each channel and attempts to sniff out impacts on your bottom line.
What’s Great about MMMs
- No cookies needed. MMMs are immune to the tightening grip of privacy limitations on your usual performance tracking.
- More than just clicks. An MMM looks for full funnel impact.
- It spots hidden opportunities. The model will make an effort to tell you where you should turn up the volume on underdeveloped channels.
Which Brands Need an MMM
If you’re a DTC brand that has been spending at least $3k/day across at least 3 different tactics or channels for the last 12 months, you should try an MMM. Your data may vary.
Companies have quoted me prices ranging from $15k to well over six figures to build an MMM.
Only now there’s been a breakthrough: AI. With Claude Code or a similar coding agent, you can have one of the world’s best coders and mathematicians. All the plans offer the same models, but I chose the $100 tier to have enough usage to run the MMM. For this article I’ll say Claude for short.
Download Claude Desktop and flip over to the Claude Code tab.
Choose an MMM
Start by choosing a free, open-source model.
- Google Meridian. My favorite. It’s well suited to accept your lift studies as calibration points and reach & frequency metrics if you have them. Plus it can model down to the DMA level. DMAs are Designated Marketing Areas, representing cities and surrounding areas. It’s how most digital ads platforms break down ad spend and how most lift studies are designed.
- Meta Robyn. This is a popular one that uses machine learning.
- PyMC-Marketing. This lets data scientists heavily customize the underlying logic of their model. Don’t forget: for $100, Claude is your full-time data scientist.
Search for one of these model names plus the word “github” to find the codebase. Give that link to Claude. It can explain itself in layman’s terms.
Gather Your Materials
You will want at least 12 months of data (a full seasonal cycle) for as many of the following items as you can get.
- Spend per channel per week. And for the channels that support it (Google, Facebook, Bing for example), per DMA.
- Impressions or clicks per channel per week, if available.
- Orders or revenue by DMA by week. I prefer GA4 for this, because of the DMA breakout.
- A spreadsheet of your promotional calendar. Include promotional holidays (“Black Friday”) as well as internal events (“Anniversary Sale”). This helps prevent a paid channel from taking credit for sitewide discounts. It can also explain sales dropoffs after promotional deadlines expire. Only include date ranges where your business did abnormally high sales, which in my experience are the last few days before a promotion expires.
- Google Trends downloads. Download the trends for your branded search term and your competitors’ branded search terms. Set the date range going back 5 years to give your report some context.
- Impressions or clicks from your internal email and SMS by week.
- Lift test results from any incrementality tests where the channel matches a channel in your MMM. I wrote a guide on upper funnel lift tests here. You will need the dates, the spend, and the iROAS result.
- A context document. Describe what you know about your customer journey. Describe your channel philosophy. The context may help Claude customize variables that describe how long a channel goes on impacting your business (“ad stock”) and its diminishing returns at scale (“saturation”). And it’ll help make Claude’s layman’s explanations more meaningful at the end.
Put all of these artifacts in a folder. Make that folder available to Claude.
Give It All to Claude
This can be as simple as telling Claude “get started.”
Tell Claude to read through everything and ask you if it needs anything else. Tell Claude to interview you. It may ask you for example:
- “How long is your customer journey typically?”
- “I detected a sales spike in month four of your data. Did you forget to log a promotion?”
- “Do you want the results here in chat or in a published web artifact?”
Answer and tell it to get started.
Watch It Work (or Go Get Coffee)
Modeling can take 30-60 minutes or longer. Claude will run the model not once but several times, trying different things to see if it gets the same results. It will do different sanity checks to see if the results make sense:
- Do multiple runs settle on similar answers?
- Does turning off a channel drop its credit below zero?
- Can it predict how new data will behave?
- Whether the model’s results were different than its starting guesses?
What You’ll Get
When it’s done, ask Claude to explain its results. Tell it to be candid about which channels pass their sanity checks above and whether they get a range of scores all above 1.0 iROAS or split.
Ask it for a recommended lift test schedule and an optimized budget. Have it start by interviewing you about your risk preferences and upcoming seasonality.
What to Watch For

How Do I Know if the Model Is Right?
Passing all the sanity checks doesn’t make a model true. But it can reduce errors. It can make directional conclusions more believable. And unless you’re in pharmaceuticals, directional may be good enough.
For example, my results above put Google pretty low (a 0.70x, really?) even after passing sanity checks. I don’t really need to know if 0.70x is accurate.
If I want to challenge the model or fine-tune its findings, the best way to check a model’s work on a specific channel is to run a lift test on a channel.
Some of My Low-Spend Channels Look Crazy Good. Should I Trust It?
Two things may be true here: A low spend can have outsized returns that will diminish quickly as you scale. But also, a low spend’s high reading may have low confidence.
As a smart marketer, you should read this as “so far so good, let’s get more data.” You don’t have to jump to either extreme of “I don’t believe it” or “stop Facebook, we’re a podcast business now.”
Some of My High-Spend Channels Look Bad. Believable?
Possibly. Flat spend (like a TV buy) can read poorly in the model if it’s hard to correlate with a wavy sales bottom line.
A lift test can help settle arguments between the clues and even sharpen the model when it runs again.
What to Do Next
Make a rubric for what would cause you to change a channel’s budget.
- +1 if you have a lift test on this channel
- +1 if the model has high confidence on this channel’s score
- +1 if the budget change is a reasonable dollar change within your risk tolerance
- +1 if you simply want more data by introducing spend variety
The more points a channel has, the more you should think about adjusting that channel’s target to fit the data.
Adjusting Your Targets
Find what a “good” iROAS means to your business by looking at modeled months where you hit your P&L goals and months where you did not. This number can be your general iROAS goal.
Then, for each channel, find its “incrementality factor” (IF). If branded search is usually an 5.25x ROAS in your preferred reporting platform but a 0.70x iROAS in the MMM, just divide iROAS by ROAS (0.70 / 5.25 = 0.13) to find your IF. Then, whatever ROAS you see in your preferred reporting platform (“yesterday I got a 6.0x”), multiply that by your IF (6.0 * 0.13 = 0.85) to see your estimated iROAS for that date range.
And if a channel’s iROAS is below your general iROAS goal, you may want a higher last-click ROAS to compensate. This may also mean turning your budget down until you hit your last-click goal, then finding a different channel where the math says to invest more.
An MMM should be one leg of a three-legged stool. The other legs are lift studies and click-based attribution.

来源:PPC Hero · ppchero.com