campaign-analytics
БесплатноЗапускает вложенные скриптыНе проверенAnalyzes campaign performance with multi-touch attribution, funnel conversion, and ROI calculation for marketing optimization
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Campaign Analytics
Production-grade campaign performance analysis with multi-touch attribution modeling, funnel conversion analysis, and ROI calculation. Three Python CLI tools provide deterministic, repeatable analytics using standard library only -- no external dependencies, no API calls, no ML models.
Table of Contents
- Capabilities
- Input Requirements
- Output Formats
- How to Use
- Scripts
- Reference Guides
- Best Practices
- Limitations
Capabilities
- Multi-Touch Attribution: Five attribution models (first-touch, last-touch, linear, time-decay, position-based) with configurable parameters
- Funnel Conversion Analysis: Stage-by-stage conversion rates, drop-off identification, bottleneck detection, and segment comparison
- Campaign ROI Calculation: ROI, ROAS, CPA, CPL, CAC metrics with industry benchmarking and underperformance flagging
- A/B Test Support: Templates for structured A/B test documentation and analysis
- Channel Comparison: Cross-channel performance comparison with normalized metrics
- Executive Reporting: Ready-to-use templates for campaign performance reports
Input Requirements
All scripts accept a JSON file as positional input argument. See assets/sample_campaign_data.json for complete examples.
Attribution Analyzer
{
"journeys": [
{
"journey_id": "j1",
"touchpoints": [
{"channel": "organic_search", "timestamp": "2025-10-01T10:00:00", "interaction": "click"},
{"channel": "email", "timestamp": "2025-10-05T14:30:00", "interaction": "open"},
{"channel": "paid_search", "timestamp": "2025-10-08T09:15:00", "interaction": "click"}
],
"converted": true,
"revenue": 500.00
}
]
}
Funnel Analyzer
{
"funnel": {
"stages": ["Awareness", "Interest", "Consideration", "Intent", "Purchase"],
"counts": [10000, 5200, 2800, 1400, 420]
}
}
Campaign ROI Calculator
{
"campaigns": [
{
"name": "Spring Email Campaign",
"channel": "email",
"spend": 5000.00,
"revenue": 25000.00,
"impressions": 50000,
"clicks": 2500,
"leads": 300,
"customers": 45
}
]
}
Output Formats
All scripts support two output formats via the --format flag:
--format text(default): Human-readable tables and summaries for review--format json: Machine-readable JSON for integrations and pipelines
Clarify First
Before running the analysis, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Analysis type: attribution, funnel, or ROI (selects which tool and report you produce).
- Source data: journey touchpoints / funnel stage counts / campaign spend+revenue as JSON (the required input the analysis runs on).
- Attribution model + half-life: matched to your average sales cycle (changes how credit is allocated across channels).
- Channel + vertical for benchmarking: sets the benchmark thresholds used to flag underperformance.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
How to Use
Attribution Analysis
# Run all 5 attribution models
python scripts/attribution_analyzer.py campaign_data.json
# Run a specific model
python scripts/attribution_analyzer.py campaign_data.json --model time-decay
# JSON output for pipeline integration
python scripts/attribution_analyzer.py campaign_data.json --format json
# Custom time-decay half-life (default: 7 days)
python scripts/attribution_analyzer.py campaign_data.json --model time-decay --half-life 14
Funnel Analysis
# Basic funnel analysis
python scripts/funnel_analyzer.py funnel_data.json
# JSON output
python scripts/funnel_analyzer.py funnel_data.json --format json
Campaign ROI Calculation
# Calculate ROI metrics for all campaigns
python scripts/campaign_roi_calculator.py campaign_data.json
# JSON output
python scripts/campaign_roi_calculator.py campaign_data.json --format json
Scripts
1. attribution_analyzer.py
Implements five industry-standard attribution models to allocate conversion credit across marketing channels:
| Model | Description | Best For |
|---|---|---|
| First-Touch | 100% credit to first interaction | Brand awareness campaigns |
| Last-Touch | 100% credit to last interaction | Direct response campaigns |
| Linear | Equal credit to all touchpoints | Balanced multi-channel evaluation |
| Time-Decay | More credit to recent touchpoints | Short sales cycles |
| Position-Based | 40/20/40 split (first/middle/last) | Full-funne |
Установить campaign-analytics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл campaign-analytics?
Analyzes campaign performance with multi-touch attribution, funnel conversion, and ROI calculation for marketing optimization
Как установить скилл campaign-analytics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл campaign-analytics запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic