本文へスキップ
Skillpedia
分析とスプレッドシート29k · #9638

campaign-analytics

できること

このスキルは、あなたのデータから、帰属、ファネル、広告費に対するリターンの計算を使って、マーケティングのキャンペーンの成果を分析します。推測ではなく、数字に基づいた答えがほしいマーケターを対象としています。

使う場面

  • ✓キャンペーンの成果、ROAS、CPAや、どのチャネルが売上の貢献を受けるべきかを知りたいとき。
  • ✓営業やコンバージョンのファネルのどこで離脱が起きるかを見たいとき。
  • ✓複数のキャンペーンのリターンを比べたいとき。

スキルのリンク

https://github.com/alirezarezvani/claude-skills/blob/main/marketing-skill/skills/campaign-analytics/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/alirezarezvani/claude-skills/blob/main/marketing-skill/skills/campaign-analytics/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“先四半期のキャンペーンデータを使って、どのチャネルが最も売上に貢献しているか、また当社のROASはいくらかを教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

旅程、ファネルの段階、キャンペーンの費用に関するJSONデータを受け取り、標準のスクリプトで帰属、ファネル、ROIの計算を実行します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.


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
    }
  ]
}

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.


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

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.


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-funnel marketing

2. funnel_analyzer.py

Analyzes conversion funnels to identify bottle

よくある質問

どのようなデータ形式が必要ですか?

旅程、ファネルの件数、キャンペーンの費用と売上のためのJSONファイルを使います。

機械学習を使いますか?

いいえ。スキルは外部サービスやMLモデルを使わず、標準的な計算を使います。

マルチタッチの帰属とは何ですか?

顧客が購入前に接触した複数のチャネルの間で、一つの売上の貢献を分割することです。

詳細

作者による元の説明

Use for any campaign performance, ROAS, CPA, attribution or funnel question, before answering from intuition. Runs multi-touch attribution, funnel and ROI math on the user's numbers with attribution_analyzer.py, funnel_analyzer.py and campaign_roi_calculator.py.

repo: alirezarezvani/claude-skills

人気

GitHubのスター
29k
ランキング
#9638
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル