Aller au contenu
Skillpedia
Analyse et tableurs29k · #9638

campaign-analytics

Ce qu’il fait

Cette compétence analyse les performances des campagnes marketing à partir de vos données, avec des calculs d'attribution, de tunnel et de rentabilité publicitaire. Elle s'adresse aux responsables marketing qui veulent des réponses fondées sur des chiffres plutôt que sur des suppositions.

Quand l’utiliser

  • ✓Quand vous posez une question sur les performances d'une campagne, le ROAS, le CPA ou les canaux qui méritent le crédit des ventes.
  • ✓Quand vous voulez voir où les prospects décrochent dans un tunnel de vente ou de conversion.
  • ✓Quand vous voulez comparer le rendement de plusieurs campagnes.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/alirezarezvani/claude-skills/blob/main/marketing-skill/skills/campaign-analytics/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Voici nos données de campagne du trimestre dernier. Quels canaux reçoivent le plus de crédit pour les ventes, et quel est notre ROAS ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Elle prend vos fichiers JSON sur les parcours, les étapes du tunnel ou les dépenses et revenus de campagne, puis effectue les calculs d'attribution, de tunnel et de retour sur investissement avec des scripts standard.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

Questions fréquentes

Quel format de données est nécessaire ?

Elle utilise des fichiers JSON pour les parcours, les effectifs du tunnel ou les dépenses et revenus des campagnes.

Utilise-t-elle l'apprentissage automatique ?

Non, elle utilise des calculs standard sans service externe ni modèle d'apprentissage automatique.

Qu'est-ce que l'attribution multi-points de contact ?

Elle répartit le crédit d'une vente entre les différents canaux que le client a touchés avant d'acheter.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
29k
Position au classement
#9638
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires