marketing-analyst
Expert marketing analytics covering campaign analysis, attribution modeling, marketing mix modeling, ROI measurement, and performance reporting. Use when analyzing campaign ROI, comparing attribution models, optimizing marketing budget allocation, building executive dashboards, or running A/B test statistical analysis.
What this skill does
# Marketing Analyst
The agent operates as a senior marketing analyst, delivering campaign performance analysis, multi-touch attribution, marketing mix modeling, ROI measurement, and data-driven budget optimization.
## Workflow
1. **Define measurement objectives** - Identify which campaigns, channels, or initiatives require analysis. Confirm KPIs (CPL, CAC, ROAS, pipeline, revenue). Checkpoint: every KPI has a target and a data source.
2. **Collect and validate data** - Pull campaign data from ad platforms, CRM, and analytics tools. Validate completeness and consistency. Checkpoint: no channel has >5% missing data.
3. **Run attribution analysis** - Apply multiple attribution models (first-touch, last-touch, linear, time-decay, position-based) and compare channel credit allocation. Checkpoint: results are compared across at least 3 models.
4. **Analyze campaign performance** - Calculate ROI, ROAS, CPL, CAC, and conversion rates per campaign. Identify top and bottom performers. Checkpoint: performance table includes target vs. actual for every metric.
5. **Optimize budget allocation** - Use marketing mix modeling or ROI data to recommend budget shifts. Checkpoint: reallocation recommendations are backed by expected ROI per channel.
6. **Build executive report** - Summarize headline metrics, wins, challenges, and next-period focus. Checkpoint: report passes the "so what" test (every data point has an actionable insight).
## Marketing Metrics Reference
### Acquisition Metrics
| Metric | Formula | Benchmark |
|--------|---------|-----------|
| CPL | Spend / Leads | Varies by industry |
| CAC | S&M Spend / New Customers | LTV/CAC > 3:1 |
| CPA | Spend / Acquisitions | Target specific |
| ROAS | Revenue / Ad Spend | > 4:1 |
### Engagement Metrics
| Metric | Formula | Benchmark |
|--------|---------|-----------|
| Engagement Rate | Engagements / Impressions | 1-5% |
| CTR | Clicks / Impressions | 0.5-2% |
| Conversion Rate | Conversions / Visitors | 2-5% |
| Bounce Rate | Single-page sessions / Total | < 50% |
### Retention Metrics
| Metric | Formula | Benchmark |
|--------|---------|-----------|
| Churn Rate | Lost Customers / Total | < 5% monthly |
| NRR | (MRR - Churn + Expansion) / MRR | > 100% |
| LTV | ARPU x Gross Margin x Lifetime | 3x+ CAC |
## Attribution Modeling
### Model Comparison
The agent should apply multiple models and compare results to identify channel over/under-valuation:
| Model | Logic | Best For |
|-------|-------|----------|
| First-touch | 100% credit to first interaction | Measuring awareness channels |
| Last-touch | 100% credit to final interaction | Measuring conversion channels |
| Linear | Equal credit across all touches | Balanced view of full journey |
| Time-decay | More credit to recent touches | Short sales cycles |
| Position-based | 40% first, 40% last, 20% middle | Most B2B scenarios |
### Attribution Calculator
```python
def calculate_attribution(touchpoints, model='position'):
"""Calculate attribution credit for a conversion journey.
Args:
touchpoints: List of channel names in order of interaction
model: One of 'first', 'last', 'linear', 'time_decay', 'position'
Returns:
Dict mapping channel -> credit (sums to 1.0)
Example:
>>> calculate_attribution(['paid_search', 'email', 'organic', 'direct'], 'position')
{'paid_search': 0.4, 'email': 0.1, 'organic': 0.1, 'direct': 0.4}
"""
n = len(touchpoints)
credits = {}
if model == 'first':
credits[touchpoints[0]] = 1.0
elif model == 'last':
credits[touchpoints[-1]] = 1.0
elif model == 'linear':
for tp in touchpoints:
credits[tp] = credits.get(tp, 0) + 1.0 / n
elif model == 'time_decay':
decay = 0.7
total = sum(decay ** i for i in range(n))
for i, tp in enumerate(reversed(touchpoints)):
credits[tp] = credits.get(tp, 0) + (decay ** i) / total
elif model == 'position':
if n == 1:
credits[touchpoints[0]] = 1.0
elif n == 2:
credits[touchpoints[0]] = 0.5
credits[touchpoints[-1]] = credits.get(touchpoints[-1], 0) + 0.5
else:
credits[touchpoints[0]] = 0.4
credits[touchpoints[-1]] = credits.get(touchpoints[-1], 0) + 0.4
for tp in touchpoints[1:-1]:
credits[tp] = credits.get(tp, 0) + 0.2 / (n - 2)
return credits
```
## Example: Campaign Analysis Report
```markdown
# Campaign Analysis: Q1 2026 Product Launch
## Performance Summary
| Metric | Target | Actual | vs Target |
|--------------|---------|---------|-----------|
| Impressions | 500K | 612K | +22% |
| Clicks | 25K | 28.4K | +14% |
| Leads | 1,200 | 1,350 | +13% |
| MQLs | 360 | 410 | +14% |
| Pipeline | $1.2M | $1.45M | +21% |
| Revenue | $380K | $425K | +12% |
## Channel Breakdown
| Channel | Spend | Leads | CPL | Pipeline |
|--------------|---------|-------|-------|----------|
| Paid Search | $45K | 520 | $87 | $580K |
| LinkedIn Ads | $30K | 310 | $97 | $420K |
| Email | $5K | 380 | $13 | $350K |
| Content/SEO | $8K | 140 | $57 | $100K |
## Key Insight
Email delivers lowest CPL ($13) and strong pipeline. Recommend shifting
10% of LinkedIn budget to email nurture sequences for Q2.
```
## Budget Optimization Framework
```
Budget Allocation Recommendation
Channel Current Optimal Change Expected ROI
Paid Search 30% 35% +5% 4.2x
Social Paid 25% 20% -5% 2.8x
Display 15% 10% -5% 1.5x
Email 10% 15% +5% 8.5x
Content 10% 12% +2% 5.2x
Events 10% 8% -2% 2.2x
Projected Impact: +15% pipeline with same budget
```
## A/B Test Statistical Analysis
```python
from scipy import stats
import numpy as np
def analyze_ab_test(control_conv, control_total, treatment_conv, treatment_total, alpha=0.05):
"""Analyze A/B test for statistical significance.
Example:
>>> result = analyze_ab_test(150, 5000, 195, 5000)
>>> result['significant']
True
>>> f"{result['lift_pct']:.1f}%"
'30.0%'
"""
p_c = control_conv / control_total
p_t = treatment_conv / treatment_total
p_pool = (control_conv + treatment_conv) / (control_total + treatment_total)
se = np.sqrt(p_pool * (1 - p_pool) * (1/control_total + 1/treatment_total))
z = (p_t - p_c) / se
p_value = 2 * (1 - stats.norm.cdf(abs(z)))
return {
'control_rate': p_c,
'treatment_rate': p_t,
'lift_pct': ((p_t - p_c) / p_c) * 100,
'p_value': p_value,
'significant': p_value < alpha,
}
```
## Scripts
```bash
# Campaign analyzer
python scripts/campaign_analyzer.py --data campaigns.csv --output report.html
# Attribution calculator
python scripts/attribution.py --touchpoints journeys.csv --model position
# ROI calculator
python scripts/roi_calculator.py --spend spend.csv --revenue revenue.csv
# Forecast generator
python scripts/forecast.py --historical data.csv --periods 6
```
## Reference Materials
- `references/metrics.md` - Marketing metrics guide
- `references/attribution.md` - Attribution modeling
- `references/reporting.md` - Reporting best practices
- `references/forecasting.md` - Forecasting methods
---
## Troubleshooting
| Symptom | Likely Cause | Resolution |
|---------|-------------|------------|
| Attribution models give wildly different channel credit allocations | No single model captures full truth; each has structural bias | Run 3+ models (first-touch, last-touch, position-based) and compare; use position-based as default for B2B |
| ROAS calculations look great but pipeline is flat | Revenue attribution counting existing customers, nRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".