attribution-model
Set up attribution models. Use when: multi-touch attribution, credit distribution rules, GA4 config, channel contribution.
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro /tmp/attribution-model && cp -r /tmp/attribution-model/skills/attribution-model ~/.claude/skills/attribution-modelSKILL.md
# /digital-marketing-pro:attribution-model
## Purpose
Design and recommend a multi-touch attribution model with implementation guidance, credit distribution rules, and platform-specific configuration. Produces a complete attribution strategy tailored to the business's data maturity, sales cycle, and analytics infrastructure.
## Input Required
The user must provide (or will be prompted for):
- **Sales cycle length**: Average number of days from first touchpoint to conversion (e.g., 7 days for e-commerce, 90+ days for B2B enterprise)
- **Active marketing channels**: All channels currently running — paid search, paid social, organic search, email, display, video, affiliate, direct mail, events, referral, content marketing, etc.
- **Conversion types**: The key conversion events being tracked — lead form, MQL, SQL, opportunity, customer, revenue, or e-commerce purchase
- **Data maturity level**: Current analytics sophistication — beginner (basic GA4, limited tagging), intermediate (UTM tracking, CRM integration, multi-platform), or advanced (data warehouse, CDI, unified user IDs)
- **Current analytics tools**: Platforms in use — GA4, HubSpot, Salesforce, Adobe Analytics, Mixpanel, custom data warehouse, or third-party attribution tools
- **Touchpoint volume**: Approximate monthly interactions across all channels (thousands, tens of thousands, hundreds of thousands)
- **Offline touchpoints**: Whether offline channels (trade shows, phone calls, direct mail, in-store visits, sales meetings) play a role in the customer journey
- **Budget allocation philosophy**: How budget decisions are currently made — gut feel, last-click data, blended ROAS, executive direction, or existing attribution data
- **Previous attribution approach**: Any existing attribution model in use and its known shortcomings or limitations
- **Key business questions**: What specific decisions attribution data needs to inform — budget allocation, channel investment, campaign optimization, executive reporting, or vendor evaluation
## Process
1. **Load brand context**: Read `~/.claude-marketing/brands/_active-brand.json` for the active slug, then load `~/.claude-marketing/brands/{slug}/profile.json`. Apply brand voice, compliance rules for target markets (`skills/context-engine/compliance-rules.md`), and industry context. **Also check for guidelines** at `~/.claude-marketing/brands/{slug}/guidelines/_manifest.json` — if present, load restrictions and relevant category files. Check for custom templates at `~/.claude-marketing/brands/{slug}/templates/`. Check for agency SOPs at `~/.claude-marketing/sops/`. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults.
2. **Assess data maturity and touchpoint landscape**: Map all active touchpoints across channels, evaluate tracking coverage (what percentage of interactions are captured), identify user identity resolution capabilities (logged-in vs. anonymous, cross-device stitching), and score overall data readiness on a 1-5 scale.
3. **Evaluate attribution model options**: Analyze seven model types against the business context — last-touch (simple but biased to bottom-funnel), first-touch (biased to top-funnel), linear (equal credit, ignores position importance), time-decay (favors recency), position-based/U-shaped (weights first and last), data-driven (algorithmic, requires volume), and marketing mix modeling (aggregate, handles offline). Score each on data requirements, accuracy, actionability, and implementation complexity.
4. **Recommend primary model with rationale**: Select the best-fit model based on sales cycle length, data maturity, touchpoint volume, and business questions. Provide a clear explanation of why this model fits and where it will still have blind spots. If data maturity is low, recommend a phased approach starting with a simpler model and graduating to data-driven as tracking matures.
5. **Define credit distribution rules**: Specify exactly how conversion credit is allocated — percentage per touchpoint position, time-decay half-life window, position-based weight splits (e.g., 40% first, 40% last, 20% distributed across middle), and rules for single-touch conversions vs. multi-touch journeys.
6. **Design lookback window**: Set the attribution lookback window based on sales cycle data — typically 1.5-2x the average sales cycle length. Define separate windows for click-through and view-through attribution. Justify the window length with sales cycle analysis and explain the tradeoffs of shorter vs. longer windows.
7. **Map implementation steps per analytics platform**: Create platform-specific configuration guides — GA4 attribution model settings and conversion path reports, HubSpot multi-touch revenue attribution setup, Salesforce campaign influence configuration, and custom data warehouse query logic. Include step-by-step setup instructions for each tool in the stack.
8. **Identify data gaps and tracking requirements**: Audit current tracking against the recommended model's requirements — missing UTM parameters, untagged campaigns, broken cross-domain tracking, absent offline touchpoint capture, incomplete CRM integration, and consent management gaps. Prioritize fixes by impact on attribution accuracy.
9. **Create attribution reporting framework**: Design the reporting structure — attribution dashboard layout, key metrics (attributed revenue per channel, cost per attributed conversion, ROAS by model), comparison views (model A vs. model B side-by-side), trend analysis over time, and executive summary format.
10. **Define model evaluation criteria**: Set review cadence (quarterly) and criteria for reassessing the model — changes in channel mix, sales cycle shifts, new touchpoint types, data maturity improvements, or significant discrepancies between attributed performance and actual business outcomes.
11. **Document limitations and known blind spots**: Explicitly state what the model cannot capture — crossInvoke when the user needs to manage multiple client brands, view portfolio-level dashboards, generate client reports, manage SOPs, switch credential profiles, assign team tasks, configure regions, or generate executive summaries. Triggers on requests involving multi-client management, agency workflows, client onboarding, or portfolio oversight.
Invoke when the user needs help with marketing measurement, KPI definition, dashboard design, attribution modeling, performance analysis, anomaly detection, competitive benchmarking, or translating data into marketing decisions. Triggers on requests involving metrics, reporting, analytics setup, or data interpretation.
Invoke when marketing content needs quality control review — brand voice consistency checks, regulatory compliance verification (GDPR, CAN-SPAM, CCPA, HIPAA, FTC, industry-specific), accessibility auditing (WCAG 2.1), inclusive language review, or brand safety assessment. Automatically invoked as a final review step before any content is published or delivered.
Invoke when the user needs competitor analysis — content strategy teardowns, SEO gap analysis, paid ad analysis from ad libraries, social media benchmarking, AI visibility comparisons, pricing and positioning research, or market landscape mapping. Triggers on requests mentioning competitors, competitive gaps, market analysis, or benchmarking.
Use when the task requires ongoing competitive monitoring, competitor change detection, share of voice tracking, competitive alerts, ad monitoring, price monitoring, win/loss analysis, or competitive narrative mapping.
Invoke when the user needs any form of marketing content created or refined — blog posts, ad copy, email campaigns, social media posts, landing page copy, press releases, video scripts, product descriptions, or newsletter content. Triggers on requests to write, draft, rewrite, or improve marketing copy.
Invoke when the user needs to manage CRM operations — creating contacts, importing leads, updating deals, syncing campaign data, segmenting audiences, managing pipelines, or connecting marketing data to Salesforce, HubSpot, Zoho, or Pipedrive. Triggers on requests involving CRM data, lead management, pipeline updates, or sales-marketing alignment.
Invoke when the user needs help with conversion rate optimization — landing page audits, A/B test design, form optimization, pricing page strategy, checkout flow improvement, personalization, statistical significance calculations, page speed impact analysis, or mobile conversion optimization. Triggers on requests involving conversions, landing pages, A/B testing, or optimization experiments.