What it does?
A Python script scores audience overlap between your Meta ad sets via histogram intersection, flags cannibalization, and estimates the wasted spend whenever overlap crosses a 0.6 threshold.
What you need
- → Meta ad account ID (act_...)
- → GoMarble API key
- → Anthropic API key
First, connect Claude Code to your ad accounts
Set up GoMarble MCP once, then paste the build prompt below into Claude Code.
Install Claude Code and Python
Download Claude Code and Python if you don't already have them installed.
Connect your Meta Ads account on GoMarble
Go to apps.gomarble.ai, sign up, and connect your Meta Ads account in the Integrations page.
Get your GoMarble API key
In GoMarble, go to Settings → API Key, copy it, and save it somewhere safe.
Add GoMarble MCP to Claude Code
Run the command below in your terminal to connect Claude Code to your GoMarble MCP server.
Claude Pro or Max is recommended for higher usage limits.
The script
Paste this into Claude Code — it will write the Python CLI script for you, based on this spec.
What you get back
-
→
Format: Running `python audience_overlap.py --meta act_123456` writes two files:
- – overlap_matrix.csv — spend-profile overlap data
- – overlap_brief.txt — an AI-written consolidation brief listing overlapping ad sets, an overlap score per pair, and an estimated wasted-spend figure
Want this automated?
Run the prompt above every Monday morning automatically. GoMarble Agents don't just deliver the report (Slack / email / in-app) — they can execute the recommended changes directly in your ad account, too. Offload the whole recurring task and stop doing it manually.
Try GoMarble Agents free →FAQ
Does this also check Google Ads?
How is the overlap score calculated?
What counts as cannibalization?
How is wasted spend estimated?
What breakdowns does it use?
Does it change my targeting automatically?
Skip the prompt — let GoMarble do this for you.
Sign up, connect your ad accounts, and audience overlap & wasted spend runs on every account, every week, automatically.