artifacts/bundle/skills/marketing-skill/campaign-analytics/SKILL.md
# 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. --- ## Input Requirements All scripts accept a JSON file as positional input argument. See `assets/sample_campaign_data.json` for complete examples. ### Attribution Analyzer ```json {
npx skillsauth add neekware/ehayeskills artifacts/bundle/skills/marketing-skill/campaign-analyticsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
All scripts accept a JSON file as positional input argument. See assets/sample_campaign_data.json for complete examples.
{
"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.0
}
]
}
{
"funnel": {
"stages": ["Awareness", "Interest", "Consideration", "Intent", "Purchase"],
"counts": [10000, 5200, 2800, 1400, 420]
}
}
{
"campaigns": [
{
"name": "Spring Email Campaign",
"channel": "email",
"spend": 5000.0,
"revenue": 25000.0,
"impressions": 50000,
"clicks": 2500,
"leads": 300,
"customers": 45
}
]
}
Before running scripts, verify your JSON is valid and matches the expected schema. Common errors:
journeys, funnel.stages, campaigns) → script exits with a descriptive KeyErrorstages and counts must be the same length) → raises ValueErrorTypeErrorUse python -m json.tool your_file.json to validate JSON syntax before passing it to any script.
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 pipelinesFor a complete campaign review, run the three scripts in sequence:
# Step 1 — Attribution: understand which channels drive conversions
python scripts/attribution_analyzer.py campaign_data.json --model time-decay
# Step 2 — Funnel: identify where prospects drop off on the path to conversion
python scripts/funnel_analyzer.py funnel_data.json
# Step 3 — ROI: calculate profitability and benchmark against industry standards
python scripts/campaign_roi_calculator.py campaign_data.json
Use attribution results to identify top-performing channels, then focus funnel analysis on those channels' segments, and finally validate ROI metrics to prioritize budget reallocation.
# 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
# Basic funnel analysis
python scripts/funnel_analyzer.py funnel_data.json
# JSON output
python scripts/funnel_analyzer.py funnel_data.json --format json
# 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
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 |
Analyzes conversion funnels to identify bottlenecks and optimization opportunities:
Calculates comprehensive ROI metrics with industry benchmarking:
| 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 |
Creator: Alireza Rezvani License: MIT Source Repo:
neekware/ehaye-skillsSource Bucket:marketing-skillOriginal Path:marketing-skill/campaign-analytics
tools
# ehAye Multimedia Use this skill for **video, audio, images, media conversion, previews, transcription, thumbnails, frame extraction, Spotter visual search, or FFmpeg-backed processing**. Core rule: use ehAye native media tools first. Do not reach first for shell `ffmpeg`, `ffprobe`, Python, or `mediainfo` when a native media tool can do the job. Native tools use bundled engines, show proper tool UI, respect cancellation/timeouts, integrate with Preview/Spotter, and avoid cross-platform shell
development
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions testing frameworks like Jest, pytest, or JUnit. Handles test generation from source code, coverage report parsing (LCOV/JSON/XML), quality scoring, and framework conversion for TypeScript, JavaScript, Python, and Java projects.
tools
Help a user set up Telegram for ehAye Dojo. Default to Personal private bots (recommended). Group setup is advanced for teams/observers/demos.
development
# Writing Skills ## Overview **Writing skills IS Test-Driven Development applied to process documentation.** **Personal skills live in agent-specific directories (`~/.claude/skills` for Claude Code, `~/.agents/skills/` for Codex)** You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes). **Core principle:** If you didn't watch an agent fail without the ski