Token导航 LogoToken导航

Agent Skill · 研究检索

campaign-analytics(活动分析)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

campaign-analytics 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 34,439。

总安装 2,228周安装 91GitHub Stars 103下载 713核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:campaign-analytics(活动分析)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/campaign-analytics
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill campaign-analytics
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill campaign-analytics

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

多触点归因分析与转化漏斗建模,量化营销活动真实 ROI。支持首次/末次接触、线性衰减等多种归因模型切换。输出渠道贡献度拆解与优化建议报告。输入数据需完整覆盖用户旅程路径,缺失环节可能导致偏差。campaign-analytics 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/campaign-analytics

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/borghei/claude-skills --skill campaign-analyti…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

campaign-analytics 怎么安装?

在终端执行 npx skills add https://github.com/borghei/claude-skills --skill campaign-analytics。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

campaign-analytics 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

campaign-analytics 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

campaign-analytics 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

campaign-analytics 用的人多吗?

公开数据是累计安装 2,228 次,近一周安装 91 次,下载 713 次,GitHub 103 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

campaign-analytics 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
campaign-analytics

活动分析 · 本页

2,228103需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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.


Table of Contents


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

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:

ModelDescriptionBest For
First-Touch100% credit to first interactionBrand awareness campaigns
Last-Touch100% credit to last interactionDirect response campaigns
LinearEqual credit to all touchpointsBalanced multi-channel evaluation
Time-DecayMore credit to recent touchpointsShort sales cycles
Position-Based40/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

GuideLocationPurpose
Attribution Models Guidereferences/attribution-models-guide.mdDeep dive into 5 models with formulas, pros/cons, selection criteria
Campaign Metrics Benchmarksreferences/campaign-metrics-benchmarks.mdIndustry benchmarks by channel and vertical for CTR, CPC, CPM, CPA, ROAS
Funnel Optimization Frameworkreferences/funnel-optimization-framework.mdStage-by-stage optimization strategies, common bottlenecks, best practices

Best Practices

  1. Use multiple attribution models -- No single model tells the full story. Compare at least 3 models to triangulate channel value.
  2. Set appropriate lookback windows -- Match your time-decay half-life to your average sales cycle length.
  3. Segment your funnels -- Always compare segments (channel, cohort, geography) to identify what drives best performance.
  4. Benchmark against your own history first -- Industry benchmarks provide context, but your own historical data is the most relevant comparison.
  5. Run ROI analysis at regular intervals -- Weekly for active campaigns, monthly for strategic review.
  6. Include all costs -- Factor in creative, tooling, and labor costs alongside media spend for accurate ROI.
  7. 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.

Typical Analysis Workflow

For 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.


Input Validation

Before running scripts, verify your JSON is valid and matches the expected schema. Common errors:

  • Missing required keys (e.g., journeys, funnel.stages, campaigns) -- script exits with a descriptive KeyError
  • Mismatched array lengths in funnel data (stages and counts must be the same length) -- raises ValueError
  • Non-numeric monetary values in ROI data -- raises TypeError

Use python -m json.tool your_file.json to validate JSON syntax before passing it to any script.

Related Skills

  • marketing-demand-acquisition: For planning campaigns that analytics measures.
  • social-media-analyzer: For social-specific analytics complementing cross-channel analysis.
  • marketing-strategy-pmm: For strategic context behind campaign performance.
  • content-creator: For optimizing content based on analytics findings.

Troubleshooting

ProblemLikely CauseSolution
Attribution model shows all credit on one channelUsing first-touch or last-touch on a multi-channel funnelSwitch to linear, time-decay, or position-based attribution. Compare at least 3 models to triangulate true channel value. GA4's data-driven attribution (DDA) is the recommended default for 2026
Funnel conversion rate is unrealistically high or lowMismatched stage definitions or counts array length errorVerify that stages and counts arrays are the same length and ordered top-to-bottom (largest count first). Ensure counts represent unique users at each stage, not cumulative events
ROI calculator flags all campaigns as underperformingChannel name in JSON does not match built-in benchmark keysUse exact channel names: email, paid_search, paid_social, display, organic_search, organic_social, referral, direct. Unrecognized channels fall back to default benchmarks
Time-decay model produces unexpected credit distributionHalf-life parameter does not match your sales cycleSet --half-life to approximately half your average sales cycle length. For B2B SaaS (60-90 day cycles), use --half-life 30. For e-commerce (1-7 day cycles), use --half-life 3
JSON parsing errors on script executionMalformed JSON, trailing commas, or encoding issuesValidate JSON with python -m json.tool your_file.json before passing to any script. Ensure UTF-8 encoding and no BOM characters
GA4 attribution data does not match script outputDifferent lookback windows and model defaultsGA4 uses a 30-day lookback for acquisition and 90-day for engagement by default. DDA falls back to last-click when a key event has fewer than 400 conversions. Align your script's --half-life and data window to match GA4 settings
Campaign spend data shows zero ROI despite conversionsRevenue field missing or set to zero in input JSONEnsure every campaign object includes a revenue field with actual attributed revenue. If revenue attribution is not available, use estimated values based on average deal size multiplied by customer count

Success Criteria

  • Attribution Model Coverage: Run at least 3 attribution models per analysis cycle to triangulate channel value. Position-based (40/20/40) or GA4 data-driven attribution is recommended as primary model for hybrid PLG/sales-led motions
  • Funnel Conversion Rate: Target overall funnel conversion (top-to-bottom) of 2-5% for B2B SaaS and 5-15% for B2C. Identify and address any single stage with >60% drop-off rate as a critical bottleneck
  • Campaign ROAS: Achieve minimum 4:1 ROAS for paid search, 3:1 for paid social, and 30:1+ for email channels (2026 industry targets). Flag any campaign below 2:1 ROAS for immediate optimization or budget reallocation
  • Cost Per Acquisition: Maintain blended CPA below $45 across channels (2026 B2B SaaS median). Channel-specific targets: email <$15, paid search <$50, paid social <$40, display <$75
  • UTM Compliance: Achieve 100% UTM parameter coverage on all paid and owned media links. Use lowercase, standardized naming (GA4 is case-sensitive). Teams with standardized UTM conventions see 29% improvement in attribution accuracy
  • Analysis Cadence: Run campaign ROI analysis weekly for active campaigns and monthly for strategic review. Update attribution models quarterly as channel mix evolves
  • Benchmark Accuracy: All campaigns should be assessed against channel-specific benchmarks, not generic averages. The built-in benchmark tables cover CTR, ROAS, and CPA by channel with low/target/high ranges

Scope & Limitations

In Scope:

  • Multi-touch attribution modeling with 5 industry-standard models (first-touch, last-touch, linear, time-decay, position-based)
  • Funnel conversion analysis with stage-by-stage metrics, bottleneck detection, and segment comparison
  • Campaign ROI calculation with 10+ metrics (ROI, ROAS, CPA, CPL, CAC, CTR, CVR, CPC, CPM, lead conversion rate)
  • Industry benchmarking by channel with underperformance flagging
  • Portfolio-level summary with channel breakdown

Out of Scope:

  • Real-time data connections or API integrations (scripts analyze static JSON snapshots)
  • Statistical significance testing for A/B tests (descriptive metrics only; use dedicated A/B testing tools for p-value calculations)
  • Cross-device identity resolution (must be handled upstream by your CDP or analytics platform)
  • Currency conversion (all monetary values assumed same currency)
  • Predictive modeling or forecasting (current analysis is retrospective)
  • GA4 or HubSpot direct integration (export data from those platforms into JSON format for analysis)
  • Datasets exceeding 100K journeys (standard library implementation, not optimized for very large datasets)

Integration Points

IntegrationPurposeHow to Connect
Google Analytics 4 (GA4)Source of journey and conversion dataExport GA4 Exploration reports or use BigQuery export to generate journey JSON. GA4's DDA model (default in 2026) complements this skill's 5 models. Align lookback windows: GA4 defaults to 30-day acquisition / 90-day engagement
HubSpotCRM attribution, lead scoring, deal dataExport HubSpot contact journey data with UTM parameters as JSON input. Use W-shaped (40-20-40) attribution for hybrid PLG/sales motions. Map HubSpot lifecycle stages to funnel analyzer stages
UTM Parameter StandardsConsistent campaign taggingEnforce lowercase UTM values: utm_source={channel}, utm_medium={type}, utm_campaign={campaign-id}, utm_content={variant}, utm_term={keyword}. GA4 treats Email and email as separate entries
social-media-analyzer skillSocial channel performance dataFeed social media campaign metrics from calculate_metrics.py into campaign_roi_calculator.py for cross-channel ROI comparison
marketing-demand-acquisition skillDemand gen campaign planningUse attribution results to identify top-performing channels, then feed insights into demand gen budget allocation decisions
Business intelligence tools (Looker, Tableau, Power BI)Dashboard visualizationUse --format json output from all three scripts for direct ingestion into BI tools. JSON output is structured for easy transformation
Spreadsheet tools (Excel, Google Sheets)Manual analysis and reportingUse --format text output for human-readable reports. Copy JSON output into spreadsheets for custom pivot analysis

Tool Reference

attribution_analyzer.py

Type: CLI script with argparse

Usage:

python attribution_analyzer.py <input_file> [--model MODEL] [--half-life DAYS] [--format FORMAT]
FlagRequiredDefaultDescription
input_fileYes--Path to JSON file containing journey/touchpoint data. Must have a top-level journeys array
--modelNoall 5 modelsRun a specific model: first-touch, last-touch, linear, time-decay, position-based
--half-lifeNo7.0Half-life in days for time-decay model. Set to ~half your average sales cycle
--formatNotextOutput format: text (human-readable tables) or json (machine-readable)

Input Schema: {"journeys": [{"journey_id": "str", "touchpoints": [{"channel": "str", "timestamp": "ISO-8601", "interaction": "str"}], "converted": bool, "revenue": float}]}

Output: Summary statistics (total journeys, conversion rate, total revenue, channels observed) plus per-model channel credit allocation with revenue and share percentages. Cross-model comparison table when running all models.

funnel_analyzer.py

Type: CLI script with argparse

Usage:

python funnel_analyzer.py <input_file> [--format FORMAT]
FlagRequiredDefaultDescription
input_fileYes--Path to JSON file containing funnel data. Must have funnel (single) or segments (multi-segment) key
--formatNotextOutput format: text or json

Single Funnel Input: {"funnel": {"stages": ["Stage1", "Stage2",...], "counts": [10000, 5200,...]}}

Multi-Segment Input: {"stages": ["Stage1", "Stage2",...], "segments": {"segment_a": {"counts": [...]}, "segment_b": {"counts": [...]}}}

Output: Stage-by-stage conversion rates, drop-off counts and percentages, cumulative conversion, bottleneck identification (both absolute and relative), and segment rankings when comparing multiple segments.

campaign_roi_calculator.py

Type: CLI script with argparse

Usage:

python campaign_roi_calculator.py <input_file> [--format FORMAT]
FlagRequiredDefaultDescription
input_fileYes--Path to JSON file containing campaign data. Must have a top-level campaigns array
--formatNotextOutput format: text or json

Input Schema: {"campaigns": [{"name": "str", "channel": "str", "spend": float, "revenue": float, "impressions": int, "clicks": int, "leads": int, "customers": int}]}

Recognized Channels for Benchmarking: email, paid_search, paid_social, display, organic_search, organic_social, referral, direct. Unrecognized channels use default benchmarks.

Calculated Metrics: ROI %, ROAS, CPA, CPL, CAC, CTR %, CVR % (lead-to-customer), CPC, CPM, click-to-lead rate %, profit. Each campaign assessed against channel-specific benchmarks (low/target/high) with performance flags and recommendations.

Output: Portfolio summary (totals, blended metrics, top performer, flagged campaigns, channel breakdown) plus per-campaign detail with benchmark assessments, warning flags, and actionable recommendations.

平台分布

Codex

34.1%
按下载量换算243

Claude

32.11%
按下载量换算229

Cursor

18.29%
按下载量换算130

Gemini CLI

8.83%
按下载量换算63

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills