robertbstillwell/marketing-skills/campaign-analytics
Claude Code and agent skill by robertbstillwell/marketing-skills
- community
Checking that the SKILL.md file is still in the repository.
Analyzes campaign performance with multi-touch attribution, funnel conversion, and ROI calculation for marketing optimization
Install
npx vskill@latest install robertbstillwell/marketing-skills/campaign-analyticsSKILL.md
The same SKILL.md was published earlier as robertbstillwell/marketing-skills/campaign-analytics.
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
Funnel Analyzer
Campaign ROI Calculator
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
How to Use
Attribution Analysis
Funnel Analysis
Campaign ROI Calculation
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-funnel marketing |
2. funnel_analyzer.py
Analyzes conversion funnels to identify bottlenecks and optimization opportunities:
- Stage-to-stage conversion rates and drop-off percentages
- Automatic bottleneck identification (largest absolute and relative drops)
- Overall funnel conversion rate
- Segment comparison when multiple segments are provided
3. campaign_roi_calculator.py
Calculates comprehensive ROI metrics with industry benchmarking:
- ROI: Return on investment percentage
- ROAS: Return on ad spend ratio
- CPA: Cost per acquisition
- CPL: Cost per lead
- CAC: Customer acquisition cost
- CTR: Click-through rate
- CVR: Conversion rate (leads to customers)
- Flags underperforming campaigns against industry benchmarks
Reference Guides
| Guide | Location | Purpose | |
|---|---|---|---|
| Attribution Models Guide | references/attribution-models-guide.md | Deep dive into 5 models with formulas, pros/cons, selection criteria | |
| Campaign Metrics Benchmarks | references/campaign-metrics-benchmarks.md | Industry benchmarks by channel and vertical for CTR, CPC, CPM, CPA, ROAS | |
| Funnel Optimization Framework | references/funnel-optimization-framework.md | Stage-by-stage optimization strategies, common bottlenecks, best practices |
Best Practices
- Use multiple attribution models -- No single model tells the full story. Compare at least 3 models to triangulate channel value.
- Set appropriate lookback windows -- Match your time-decay half-life to your average sales cycle length.
- Segment your funnels -- Always compare segments (channel, cohort, geography) to identify what drives best performance.
- Benchmark against your own history first -- Industry benchmarks provide context, but your own historical data is the most relevant comparison.
- Run ROI analysis at regular intervals -- Weekly for active campaigns, monthly for strategic review.
- Include all costs -- Factor in creative, tooling, and labor costs alongside media spend for accurate ROI.
- Document A/B tests rigorously -- Use the provided template to ensure statistical validity and clear decision criteria.
Limitations
- No statistical significance testing -- A/B test analysis requires external tools for p-value calculations. Scripts provide descriptive metrics only.
- Standard library only -- No advanced statistical or data processing libraries. Suitable for most campaign sizes but not optimized for datasets exceeding 100K journeys.
- Offline analysis -- Scripts analyze static JSON snapshots. No real-time data connections or API integrations.
- Single-currency -- All monetary values assumed to be in the same currency. No currency conversion support.
- Simplified time-decay -- Uses exponential decay based on configurable half-life. Does not account for weekday/weekend or seasonal patterns.
- No cross-device tracking -- Attribution operates on provided journey data as-is. Cross-device identity resolution must be handled upstream.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingalirezarezvani/marketing-skill/campaign-analytics/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/robertbstillwell/marketing-skills/campaign-analytics)