agentleFS
Synter-Media-AISynter-Media-AI/free-skills/skills/attribution-modeling/SKILL.md

attribution-modeling

Skill4 starsChanged 6 months agoMITView on GitHub

Multi-touch attribution modeling for advertising campaigns. Use when analyzing conversion paths, comparing attribution models, implementing data-driven attribution, or understanding assisted conversions.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default model in most ad platforms

    line 40
  2. Distinctive:

    When recency matters most

    line 76
  3. Distinctive:

    When introduction and closing are most valuable

    line 96
  4. Distinctive:

    No assumptions about touchpoint value

    line 108
  5. Distinctive:

    Create comparison table showing credit shifts

    line 176
  6. Distinctive:

    If Channel A gets 40% on last-touch but 15% on first-touch → it's a closer, not a discoverer

    line 179
  7. Distinctive:

    If Channel B gets 5% on last-touch but 30% on first-touch → it's an awareness driver

    line 180
  8. Distinctive:

    Look for channels where DDA credits significantly more than last-click

    line 201
  9. Distinctive:

    Recommendation: Don't cut LinkedIn. It feeds the top of funnel.

    line 277
  10. Distinctive:

    Fix: Use GA4 DDA as source of truth.

    line 297

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Attribution Modeling

Analyze and implement multi-touch attribution models to understand how each marketing touchpoint contributes to conversions. Covers first-touch, last-touch, linear, time-decay, position-based, data-driven, and Markov chain attribution across Google Ads, Meta, and analytics platforms.

Capabilities

  1. Model Selection - Recommend the best attribution model based on sales cycle length, channel mix, and business goals
  2. Conversion Path Analysis - Map customer journeys from first interaction to conversion
  3. Assisted Conversion Valuation - Quantify the contribution of upper-funnel channels
  4. Cross-Channel Comparison - Compare how different models redistribute credit across channels
  5. Data-Driven Attribution - Implement algorithmic attribution using Markov chains or Shapley values
  6. GA4 Attribution Configuration - Set up and interpret GA4's data-driven attribution

Attribution Models Reference

1. First-Touch Attribution

Formula: 100% credit → first interaction

When to use:

  • Brand awareness campaigns
  • Top-of-funnel budget justification
  • Short sales cycles (< 7 days)

Strengths: Simple, highlights discovery channels Weaknesses: Ignores nurturing touchpoints, overvalues awareness

2. Last-Touch Attribution

Formula: 100% credit → last interaction before conversion

When to use:

  • Direct response campaigns
  • Short consideration windows
  • Default model in most ad platforms

Strengths: Simple, clear ROI per channel Weaknesses: Ignores awareness and consideration touchpoints

3. Linear Attribution

Formula: Credit = 1 / N (where N = total touchpoints)

Example: 4 touchpoints → each gets 25%

When to use:

  • Equal-value touchpoint assumption
  • Long sales cycles with consistent engagement
  • B2B with multiple decision influencers

Strengths: Fair distribution, simple math Weaknesses: Overvalues low-impact touches, no time weighting

4. Time-Decay Attribution

Formula: Credit_i = 2^((t_i - t_conversion) / half_life) / Σ 2^((t_j - t_conversion) / half_life)

Default half-life: 7 days (Google Ads default)

Example (14-day path, 7-day half-life):

TouchpointDays Before ConversionRaw WeightCredit
Display Ad-142^(-14/7) = 0.2510.5%
Email-72^(-7/7) = 0.5021.1%
Search Ad-32^(-3/7) = 0.7431.2%
Brand Search02^(0/7) = 1.0042.1%

When to use:

  • Promotions with deadlines
  • Seasonal campaigns
  • When recency matters most

5. Position-Based (U-Shaped) Attribution

Formula:

  • First touch: 40%
  • Last touch: 40%
  • Middle touches: 20% / (N - 2)

Example (5 touchpoints):

PositionCredit
First (Display)40%
Middle (Email)6.67%
Middle (Social)6.67%
Middle (Retarget)6.67%
Last (Brand Search)40%

When to use:

  • B2B lead generation
  • When introduction and closing are most valuable
  • Medium-length sales cycles (14-30 days)

6. Data-Driven Attribution (DDA)

How it works: Uses machine learning to analyze all conversion paths and assign credit based on statistical impact.

Requirements:

  • Google Ads: 3,000 ad interactions + 300 conversions in 30 days
  • GA4: Available for all properties (uses Shapley values)

Advantages:

  • No assumptions about touchpoint value
  • Adapts to actual customer behavior
  • Accounts for path position, frequency, and sequence

Markov Chain Attribution

Concept

Models the customer journey as a state machine where each channel is a state with transition probabilities.

Step-by-Step Implementation

Step 1: Build the transition matrix

From conversion paths, calculate probability of moving from one state to another:

States: [Start, Paid Search, Display, Email, Social, Conversion, Null]

Transition Matrix P:
           PS    Display  Email  Social  Conv   Null
Start    [0.35,  0.25,   0.20,  0.15,  0.00,  0.05]
PS       [0.10,  0.05,   0.15,  0.05,  0.55,  0.10]
Display  [0.30,  0.05,   0.20,  0.10,  0.15,  0.20]
Email    [0.15,  0.10,   0.05,  0.05,  0.50,  0.15]
Social   [0.20,  0.15,   0.15,  0.05,  0.25,  0.20]

Step 2: Calculate total conversion probability

P(conversion) = probability of reaching "Conversion" state from "Start" using matrix absorption.

Step 3: Calculate removal effect

For each channel, remove it from the model and recalculate conversion probability:

Removal Effect(channel) = 1 - P(conversion without channel) / P(conversion with all channels)

Step 4: Normalize to get attribution weights

Attribution(channel) = Removal Effect(channel) / Σ Removal Effect(all channels)

Example Calculation

ChannelP(conv) with allP(conv) withoutRemoval EffectAttribution
Paid Search0.420.1857.1%38.2%
Display0.420.3516.7%11.2%
Email0.420.2247.6%31.9%
Social0.420.3028.6%19.1%

Workflows

Workflow 1: Model Comparison Analysis

  1. Pull conversion paths from GA4:
    • Navigate to Advertising → Attribution → Conversion paths
    • Set date range to 30+ days
    • Filter by conversion event
  2. Export path data with touchpoint sequence, timestamps, and conversion values
  3. Apply each model to the same dataset:
    • Calculate revenue attribution per channel per model
    • Create comparison table showing credit shifts
  4. Identify discrepancies:
    • If Channel A gets 40% on last-touch but 15% on first-touch → it's a closer, not a discoverer
    • If Channel B gets 5% on last-touch but 30% on first-touch → it's an awareness driver
  5. Recommend model based on business stage:
    • Growth stage → Position-based or DDA
    • Efficiency stage → Time-decay or DDA
    • Brand building → First-touch or DDA

Workflow 2: GA4 Attribution Setup

  1. Access attribution settings:
    • Admin → Attribution Settings
    • Select reporting attribution model (default: Data-driven)
    • Set lookback window: 30 days for acquisition, 90 days for other conversions
  2. Configure conversion events:
    • Admin → Events → Mark as conversion
    • Set counting method: Once per session (leads) or Every event (purchases)
  3. Review attribution reports:
    • Advertising → Attribution → Model comparison
    • Compare DDA vs Last-click for each channel
    • Look for channels where DDA credits significantly more than last-click
  4. Export and act:
    • Increase budget on channels undervalued by last-click
    • Decrease budget on channels overvalued by last-click
    • Monitor for 2-4 weeks before further adjustments

Workflow 3: Assisted Conversions Analysis

  1. Pull assisted conversion data from GA4:
    • Advertising → Attribution → Conversion paths
    • Note "Assisted conversions" vs "Last-click conversions" per channel
  2. Calculate Assisted/Last ratio:
    Assist Ratio = Assisted Conversions / Last-Click Conversions
  3. Interpret ratios:
    RatioInterpretation
    < 0.5Primarily a closer (last-touch channel)
    0.5 - 1.0Balanced role (both assists and closes)
    1.0 - 3.0Primarily an assister (mid-funnel)
    > 3.0Almost exclusively awareness/discovery
  4. Budget implications:
    • High-assist channels deserve more budget than last-click ROAS suggests
    • Cutting high-assist channels will reduce conversions on other channels

Reference Data

Typical Attribution Shifts by Channel

ChannelLast-Touch CreditDDA CreditTypical Shift
Brand Search35-45%20-30%↓ Overvalued
Non-Brand Search20-30%20-25%→ Stable
Display3-8%8-15%↑ Undervalued
Social (Organic)5-10%8-12%↑ Slightly undervalued
Social (Paid)8-15%10-18%↑ Slightly undervalued
Email10-20%8-15%↓ Slightly overvalued
Direct15-25%10-15%↓ Overvalued

Lookback Window Recommendations

Business TypeRecommended WindowRationale
E-commerce (low AOV)7-14 daysImpulse purchases
E-commerce (high AOV)30 daysResearch phase
B2B SaaS60-90 daysLong sales cycle
B2B Enterprise90+ daysMultiple stakeholders
Local services7-14 daysUrgency-driven
Travel / Hospitality30-45 daysPlanning phase

Platform-Specific Attribution Defaults

PlatformDefault ModelLookback (Click)Lookback (View)
Google AdsData-driven30 days1 day
Meta Ads7-day click, 1-day view7 days1 day
LinkedIn AdsLast-touch90 days7 days
TikTok AdsLast-touch7 days1 day
Reddit AdsLast-touch28 days1 day

Examples

Example 1: B2B SaaS Attribution Analysis

Scenario: A SaaS company spends $50K/month across Google, LinkedIn, and content marketing. Last-click shows Google at 4x ROAS and LinkedIn at 0.8x ROAS.

Analysis with position-based model:

  • LinkedIn drives 45% of first touches (awareness)
  • Google captures 60% of last touches (closing)
  • Content marketing handles 70% of middle touches (nurturing)

Recommendation: Don't cut LinkedIn. It feeds the top of funnel. Cutting it would reduce Google's closing conversions within 30-60 days.

Example 2: E-commerce Markov Chain Results

Scenario: Online retailer with 10K conversion paths analyzed.

Removal effects:

  • Removing Paid Social → 34% fewer conversions
  • Removing Paid Search → 28% fewer conversions
  • Removing Email → 22% fewer conversions
  • Removing Display → 16% fewer conversions

Budget reallocation: Shift 15% of display budget to paid social, which has higher marginal impact per dollar despite lower last-click ROAS.

Example 3: Cross-Platform Attribution Conflict

Scenario: Meta reports 500 conversions, Google reports 400 conversions, but GA4 only shows 350 total conversions.

Root cause: Platform self-attribution double counts conversions where users saw both a Meta ad and clicked a Google ad.

Fix: Use GA4 DDA as source of truth. Apply platform-specific credit:

  • Meta DDA credit: 210 conversions (60%)
  • Google DDA credit: 140 conversions (40%)
  • Total matches GA4: 350

About this skill

Part of the Synter free skills collection — open-source agent skills for advertising, PPC, and marketing automation.

Want this skill (and 40+ more) running on autopilot against your live ad accounts? Try Synter — AI Agent Media Buyers that connect to Google, Meta, LinkedIn, TikTok, Reddit, Amazon, and 7+ more platforms.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.