Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính29k · #9638

campaign-analytics

Skill này làm gì

Skill này phân tích hiệu quả chiến dịch marketing từ dữ liệu của bạn, bằng các phép tính phân bổ, phễu và lợi tức chi tiêu. Nó dành cho marketer muốn có câu trả lời dựa trên số liệu thay vì phỏng đoán.

Khi nào nên dùng

  • ✓Khi bạn hỏi về hiệu quả chiến dịch, ROAS, CPA hoặc kênh nào xứng đáng được ghi nhận doanh số.
  • ✓Khi bạn muốn xem khách hàng rời phễu bán hàng hoặc phễu chuyển đổi ở đâu.
  • ✓Khi bạn muốn so sánh lợi nhuận của nhiều chiến dịch.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/alirezarezvani/claude-skills/blob/main/marketing-skill/skills/campaign-analytics/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Đây là dữ liệu chiến dịch của chúng tôi trong quý trước. Kênh nào được ghi nhận nhiều doanh số nhất, và ROAS của chúng tôi là bao nhiêu?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill nhận dữ liệu JSON về hành trình, số liệu phễu hoặc chi tiêu chiến dịch, rồi chạy các phép tính phân bổ, phễu và ROI bằng các script tiêu chuẩn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Cần định dạng dữ liệu nào?

Nó dùng file JSON cho hành trình, số liệu phễu hoặc chi tiêu và doanh thu chiến dịch.

Nó có dùng học máy không?

Không. Skill dùng các phép tính tiêu chuẩn, không có dịch vụ bên ngoài hay mô hình ML.

Phân bổ đa điểm chạm là gì?

Nó chia công lao của một đơn hàng cho nhiều kênh mà khách hàng đã tương tác trước khi mua.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9638
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự