Campaign Analytics
Analyzes marketing campaigns with five attribution models, funnel drop-off detection, and full ROI/ROAS/CPA metrics via three dependency-free Python CLIs.
Marketing & SEOIntermediate★ 24,151⑂ 3,405AI score 9/10Last updated: Aug 9, 2026
What it does
- Attribution modeling: First-Touch, Last-Touch, Linear, Time-Decay (configurable half-life, default 7 days) and Position-Based 40/20/40 credit allocation across channels.
- Funnel analysis: stage-to-stage conversion and drop-off rates, automatic bottleneck detection (largest absolute and relative drop), and segment comparison.
- ROI calculation: ROI, ROAS, CPA, CPL, CAC, CTR, CVR with industry benchmark flags for underperforming campaigns.
- Standard-library-only Python scripts with
--format textfor humans and--format jsonfor pipelines, plus reference guides on attribution models, benchmarks, and funnel optimization.
Who it's for
- Performance and growth marketers who own channel budgets
- Agencies that need repeatable, auditable attribution and ROI reports
- Analysts who want deterministic offline math instead of black-box platform attribution
Usage examples
python scripts/attribution_analyzer.py campaign_data.json --model time-decay --half-life 14to match a two-week sales cycle.python scripts/funnel_analyzer.py funnel_data.jsonto find that Interest→Consideration is the biggest leak and prioritize landing-page fixes.python scripts/campaign_roi_calculator.py campaign_data.json --format jsonto export ROAS/CPA per channel into a dashboard and justify budget reallocation.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/alirezarezvani/claude-skills/HEAD/.gemini/skills/campaign-analytics/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .gemini/skills/campaign-analytics folder from the GitHub repo alirezarezvani/claude-skills into my ~/.claude/skills/campaign-analytics/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/alirezarezvani/claude-skills.git /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/.gemini/skills/campaign-analytics ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and confirm Python 3 and git are installed (
python3 --version,git --version). - Clone the repo:
git clone https://github.com/alirezarezvani/claude-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r claude-skills/.gemini/skills/campaign-analytics ~/.claude/skills/ - Verify
~/.claude/skills/campaign-analyticscontainsSKILL.md,scripts/,references/, andassets/. - Restart Claude Code and ask something like "analyze my campaign attribution and ROI".
- Shape your data to match
assets/sample_campaign_data.json, validate it withpython -m json.tool yourfile.json, then run the scripts in order: attribution → funnel → ROI.
View source on GitHub ↗License: MIT