Paste the conflicting numbers from your ad accounts

Find Out Which Marketing Actually Made The Sale

by coreyhaines31 · MIT license · ★ 51,120 on GitHub · updated Sep 5

Find Out Which Marketing Actually Made The Sale cover

Paste the conflicting numbers from your ad accounts, website stats and sales records; get back one honest read on which channels really drove sales and where to put your budget.

---
name: attribution
description: When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions "attribution," "attribution model," "first-touch vs last-touch," "multi-touch," "which channel drives revenue," "what's my real CAC," "my dashboards disagree," "Google/Meta says X but GA says Y," "media mix model," "MMM," "incrementality," "geo lift," "holdout test," "how did you hear about us," "self-reported attribution," "dark social," or wants to instrument attribution themselves — "stitch my bookings to their source," "SavvyCal/Calendly attribution," "close the identify gap," "track conversions on a third-party domain," "first-party / self-hosted attribution." For event tracking setup and UTMs, see analytics. For ad-platform pixels/CAPI, see ads. For pipeline and CRM revenue reporting, see revops. For the AI-search attribution blind spot, see ai-seo.
metadata:
  version: 1.1.0
---

# Attribution

You help users answer the hardest question in marketing: **which of my efforts actually caused this conversion and this revenue?** Attribution is where marketers lose the most money — to channels that look good in one dashboard and terrible in another, to "direct" and "branded search" that hide the real source, and to models that quietly encode an opinion as if it were fact.

This skill has two pillars. Know which one the user needs before you dive in:

- **(A) Interpretation** — choosing an attribution model, picking a measurement approach, and *reconciling the conflicting numbers* your tools report. This applies to everyone, even with zero engineering.
- **(B) Own your attribution (first-party)** — instrumenting and stitching attribution *yourself* when you control the site/app. This is the build track. Use it when the user says "I want to track this myself" or is hitting a conversion that lives on a domain they don't own.

Most requests start with (A). Reach for (B) only when they control the surface and want to build.

Overview

You help users answer the hardest question in marketing: which of my efforts actually caused this conversion and this revenue? Attribution is where marketers lose the most money — to channels that look good in one dashboard and terrible in another, to "direct" and "branded search" that hide the real source, and to models that quietly encode an opinion as if it were fact.

Manual install (npx, ZIP)
Claude Codenpx skills add coreyhaines31/marketingskills --skill attribution -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/coreyhaines31/marketingskills/tar.gz/5b2c0007766c \ | tar -xz -C ~/.claude/skills --strip-components=2 marketingskills-5b2c0007766c/skills/attribution
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/e434c63f3ee78e37516e/attribution.zip" -OutFile "$env:TEMP\attribution.zip"; Expand-Archive "$env:TEMP\attribution.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md20.4 KB
  • evals/1 file · 10.1 KB
  • references/4 files · 40.0 KB
Read the files here
coreyhaines31/5b2c0006 files
Shared references10SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text225 lines

Attribution

You help users answer the hardest question in marketing: which of my efforts actually caused this conversion and this revenue? Attribution is where marketers lose the most money — to channels that look good in one dashboard and terrible in another, to "direct" and "branded search" that hide the real source, and to models that quietly encode an opinion as if it were fact.

This skill has two pillars. Know which one the user needs before you dive in:

  • (A) Interpretation — choosing an attribution model, picking a measurement approach, and reconciling the conflicting numbers your tools report. This applies to everyone, even with zero engineering.
  • (B) Own your attribution (first-party) — instrumenting and stitching attribution yourself when you control the site/app. This is the build track. Use it when the user says "I want to track this myself" or is hitting a conversion that lives on a domain they don't own.

Most requests start with (A). Reach for (B) only when they control the surface and want to build.

Product context: check for .agents/product-marketing.md and read it if present — business type, sales cycle, and primary conversion drive almost every recommendation here.

Boundaries — what this skill does NOT own

State these up front so you don't rebuild neighboring skills:

  • General event tracking, tracking plans, UTM setup, GA4/GTM → analytics. Attribution assumes tracking exists. The line: analytics = "what events and how to fire them"; attribution = "how touches join to conversions and survive to revenue."
  • Ad-platform pixels, CAPI, server-side conversion tracking → ads (references/conversion-tracking.md). Attribution consumes platform-reported numbers and corrects for their bias; it doesn't set up the pixels.
  • Pipeline stages, lead lifecycle, CRM revenue dashboards → revops. Attribution feeds pipeline data; it doesn't define stages.
  • Showing up in / measuring AI search → ai-seo. Attribution names AI traffic as a blind spot only.

Pillar A — Interpretation

1. What attribution can and can't tell you

Set expectations before touching a number:

  • Attribution is directional, not truth. It's a model of causality built from incomplete data (cookies expire, sessions fragment, offline touches vanish, people research on one device and buy on another). Treat it as a strong hint, never a verdict.
  • Every model is an opinion. "First-touch" says the first ad gets all the credit; "last-touch" says the closing click does. Both are wrong in opposite directions. Choosing a model is choosing whose story to believe — say so out loud.
  • The attribution gap is normal. The sum of channel-reported conversions almost always exceeds real conversions, because every platform claims credit for the same sale. Your job is to shrink and explain the gap, not to make the numbers tie out perfectly. They won't.

When a user demands one true number, reframe: "We can get you a defensible, consistent number and a read on which channels are trending up. A single objective truth doesn't exist — here's why, and here's what we use to make decisions anyway."

2. Attribution models

The six standard models and when each one lies:

Model Credit rule Best for How it lies
First-touch 100% to the first known touch Top-of-funnel / demand-gen valuation; short cycles Ignores everything that closed the deal; over-credits awareness channels
Last-touch 100% to the last touch before conversion Direct-response, quick e-comm Over-credits bottom-funnel + branded search/direct; ignores what created demand
Last non-direct 100% to last touch, skipping "direct" A cheap fix for direct pollution Still single-touch; just moves the blind spot
Linear Equal credit to every touch Long, multi-touch journeys where every step matters Treats a throwaway visit like a demo; flatters high-frequency channels
Time-decay More credit to touches nearer conversion Longer cycles where recency matters Under-credits the top of funnel; still an assumption, not a measurement
Position-based (U-shaped) 40% first, 40% last, 20% middle B2B with clear "created" + "closed" moments The 40/40/20 split is arbitrary; middle touches get shortchanged
Data-driven (algorithmic/Shapley) Credit from modeled marginal contribution High-volume accounts with enough conversions A black box; needs volume; can't see offline/dark touches it was never fed

Rules of thumb:

  • Never report a single model in isolation for a long sales cycle. Show first-touch and last-touch side by side — the truth lives between them, and the gap between them is the insight.
  • Data-driven attribution needs volume (Google Ads historically gated it behind ~3,000 ad interactions and ~300 conversions in 30 days; it has since relaxed the minimums and made DDA the default, but low volume still makes it noise dressed as science). Use position-based instead when you're thin.
  • The model matters far less than being consistent and pairing it with an out-of-model sanity check (Pillar A §4, self-reported).

For the model math, worked examples of one journey scored six ways, and Shapley explained plainly, see references/attribution-models.md.

3. The three measurement paradigms

Models split credit within your tracked data. Paradigms are how you get at causality — increasingly rigorous, increasingly expensive:

Paradigm What it is Answers Needs Watch out
MTA (multi-touch attribution) Stitch user-level touches, apply a model "Which touchpoints appear on converting journeys?" Clean cross-device user-level tracking Cookie loss + privacy have gutted user-level data; it silently under-measures
MMM (media/marketing mix modeling) Top-down regression of spend vs. outcomes over time "What's each channel's aggregate contribution, including offline/brand?" 2–3 yrs of weekly data, spend variation Correlational; slow to react; needs real budget swings to learn
Incrementality (geo holdout, PSA, ghost ads, on/off) Controlled experiment: exposed vs. withheld "Did this channel cause lift I wouldn't have gotten anyway?" Ability to withhold; enough volume for significance The gold standard, but you can only test a few things at a time

How to choose: small budget / short cycle → good UTM + last-non-direct + a self-reported survey beats a fancy model. Mid budget, several channels → MTA for day-to-day + periodic incrementality tests on your biggest line items. Large budget, offline + brand spend → MMM for the portfolio + incrementality to validate MMM's coefficients. Incrementality is the tiebreaker whenever two channels both claim the same conversions.

Decision table by budget × sales cycle × channel count, and how to read a geo-holdout / PSA test (not a stats tutorial), in references/measurement-paradigms.md.

4. Self-reported attribution

The most underused signal, and often the most honest for long cycles and dark social. A post-conversion "How did you hear about us?" survey catches what tracking structurally cannot: podcasts, word of mouth, Slack communities, a founder's tweet, "a friend told me."

  • When it beats tracking: long consideration cycles, high word-of-mouth, brand/community-led, or heavy dark-social (see §5). If a big slice of your journeys are "direct," you have a self-reported-shaped hole.
  • Ask at the moment of conversion (signup, first purchase, demo request) — highest recall, before memory fades.
  • Wording: open-ended ("How did you first hear about us?") captures dark social; a short pick-list is easier to quantify but pre-biases the answer. Best practice: pick-list of your known channels plus a free-text "other/tell us more."
  • Treat it as a triangulation input, not gospel — recall is fuzzy and people credit the memorable touch, not the first. It's the out-of-model check that keeps your tracked models honest.
  • On the build side, this is a form field written to your CRM/analytics as a person property — see Pillar B and references/first-party-tracking.md.
5. Reconciling conflicting sources

The request behind most attribution work: "Google says 50, Meta says 40, GA says 60, my CRM says 35 — who's right?" Nobody is. Here's the framework.

Why each source systematically lies:

Source Biased toward Because
Ad platforms (Google/Meta/LinkedIn) Over-counts itself Claims view-through + click conversions in its own window; every platform counts the same sale; motivated to look good
GA / web analytics Last non-direct click Loses cross-device, loses cookie-blocked users, dumps the unknown into direct
CRM Whatever the rep typed / the form captured Human entry, lead-source overwrites, offline deals with no digital trail
Self-reported survey The memorable touch Recall bias; under-counts boring-but-real touches like retargeting

How to triangulate:

  1. Pick one source of truth for the conversion count — usually your CRM or backend (the system where money is real). Everything else explains where those came from, they don't get to redefine how many.
  2. Never sum across platforms. If Google and Meta both claim a conversion, you have one conversion with two claimants, not two conversions. De-dupe against the source-of-truth total.
  3. Read directional agreement, not absolute match. If every source says paid search is up and organic is down this quarter, that trend is trustworthy even though no two numbers match.
  4. Use self-reported as the tiebreaker when platforms fight over the same conversions, and incrementality when the stakes justify a test.
  5. Expect and budget for the gap. Report "platforms claim N; we can verify M; the delta is over-claiming + view-through + untracked — here's our best allocation."

The output is an honest allocation with confidence levels, not a false reconciliation to the decimal.

6. The blind spots

Where conversions hide, making real channels look weak:

  • Direct — the junk drawer. Bookmarks and typed URLs, yes, but also stripped referrers, app-to-web, dark social, and any touch your tracking dropped. A large direct share is a measurement problem, not a channel.
  • Branded search — people who discovered you elsewhere and Googled your name. Last-touch hands the credit to paid/organic branded search; the real driver was whatever made them search. Segment branded vs. non-branded or you'll defund the top of funnel.
  • Dark social — sharing that carries no referrer: DMs, Slack/Discord, podcasts, newsletters, screenshots. Structurally invisible to tracking; self-reported is the only way to see it (§4).
  • AI traffic — assistants and AI search increasingly influence buyers, then send them via branded search or direct, so the AI touch is invisible in analytics. Name it and hand deeper work to ai-seo.

The through-line: when "direct" and "branded search" dominate, your top of funnel is working and your attribution is hiding it. Say that explicitly — it's the single most common misread in marketing.

7. Business-type fork

Defaults differ sharply. Summary here; full playbooks in references/by-business-type.md.

  • B2B SaaS (long cycle, sales-assisted): journeys span weeks–months and multiple people, so single-touch models mislead badly. Anchor on the CRM as source of truth, use first-touch + position-based side by side, lean hard on self-reported at demo/signup, and treat pipeline/revenue attribution (→ revops) as the real scoreboard. Offline touches (events, sales convos) make MTA weakest and self-reported strongest here.
  • Ecommerce / DTC (short cycle, self-serve): fast journeys, high volume, spend concentrated in paid social + search. Anchor on platform ROAS but distrust it (iOS/CAPI inflation), validate with MMM once spend is material and incrementality/geo-holdouts on your biggest channels, and use a post-purchase survey to catch what pixels miss. Last-touch is defensible for quick-turn SKUs; MMM+incrementality is how you allocate the real budget.

Pillar B — Own your attribution (first-party)

Use this when the user controls the site/app and wants to instrument attribution themselves — especially for a conversion that happens on a domain they don't own (a SavvyCal/Calendly/Cal.com booking, a Stripe Checkout page). This pillar is grounded in real production builds; the full runbook with code patterns is in references/first-party-tracking.md. The essentials:

The identity graph

First-party attribution is one idea: join anonymous browsing to the eventual conversion.

  1. A visitor arrives anonymously; your analytics tool assigns an anonymous distinct_id and stamps first-touch properties ($initial_referrer, $initial_utm_*) on their events.
  2. At conversion (signup, booking, purchase) you call identify() with a stable id (email or user UUID). This merges the anonymous history into a known person — first-touch now survives all the way to the conversion.
  3. Every conversion event can now be broken down by first-touch channel. That's the whole game.
Closing the identify() gap

The most common first-party failure: nothing ever calls identify(), so conversions never join to browsing history and every customer looks like they appeared from nowhere. (Framing adapted from Tessa Kriesel's PostHog approach.) The fix is to call identify at each real conversion. Audit first — many SaaS apps already identify at signup; don't rebuild what works. Find the specific un-instrumented conversions and close only those.

Stitching conversions on a third-party domain

The one case that needs real machinery: a conversion that completes on a domain you don't control (a booking tool, a hosted checkout). You can't run your analytics there, so:

  1. At click time, a capture-phase link decorator appends the visitor's anonymous distinct_id to the outbound URL via the tool's metadata passthrough (e.g. ?metadata[ph_distinct_id]=<id>). One document-level listener covers every CTA — no per-link edits.
  2. The third-party tool stores that metadata and returns it in its webhook.
  3. Your webhook handler fires an identity merge ($identify with the booking email as distinct_id and the smuggled anonymous id as $anon_distinct_id) plus a conversion event — joining the booking back onto the marketing journey.
Guardrails (do not skip)
  • Anonymity guard — fail closed. Only ever smuggle the anonymous id. After identify(), the current id becomes the user's email/UUID; leaking that into a third-party URL or merging on it corrupts profiles (person A's email folds into whoever books). Reject ids that look like PII (contain @), cap length, and when identity is ambiguous, send nothing. If the app identifies by UUID, test distinct_id === device_id rather than an @ check.
  • First-touch data quality. Redirects overwrite the true first touch. Exclude OAuth/checkout referrers (accounts.google.com, checkout.stripe.com, login.*), your own subdomains (self-referrals), and dev hosts (localhost) from referrer classification. This is usually a settings change, not code, and it's the highest-trust-per-effort fix.
  • Cross-subdomain stitching. Marketing site → app on a subdomain must share one analytics project + a cross-subdomain cookie, or the journey breaks at the handoff. Expect near-zero numbers until the stitch is verified in prod — don't panic at empty data; use a campaign-window heuristic fallback and backfill the pre-stitch cohort in the meantime (details in the reference).
Reporting and the last mile

The first payoff is one insight: your conversion event broken down by first-touch channel ($initial_utm_source / $initial_referring_domain), and — joined to revenue — channel → conversion → revenue. Confirm first-touch vs. last-touch config in the tool (many default to last-touch; first-party attribution wants $initial_*).

But first-touch alone can't run the multi-touch models from §2. Store the full ordered touch path (not just $initial_*) and the build track feeds the interpretation track — you can score your own journeys position-based / linear / time-decay instead of only reading about them.

The last mile — get it into the CRM (production refinement from Tessa Kriesel). A breakdown in an analytics tool is a report; sales and lifecycle act on attribution written onto the record. Sync a source field with confidence and basis (journey-linked vs self-reported vs campaign-window fallback) plus a Paid-vs-Organic read off the medium, rolled up to the account (not just the contact — one B2B org is several people with mixed work/personal emails). How pipeline/lifecycle then use it is revops' job.

The pattern is tool-agnostic: identify + merge exists in PostHog, Segment, Amplitude, and via user-id in GA4; the third-party stitch works with any tool that has a metadata passthrough + webhook. PostHog + SavvyCal are the worked example in references/first-party-tracking.md.


Output format

Deliver an attribution readout, not a data dump:

# Attribution Readout — [date]

## The question
[What decision this informs — e.g. "where should next quarter's budget go?"]

## Source of truth
[Which system defines the conversion count, and why]

## What each source says
| Channel | Platform-reported | GA | CRM | Self-reported | Our read |
|---------|------------------|----|----|--------------|----------|
[De-duped against source of truth; not summed]

## Model comparison (for long cycles)
[First-touch vs last-touch side by side; the gap is the insight]

## Confidence & gaps
[The attribution gap, the blind spots, what we can't see]

## Recommendation
[Allocation call with confidence levels; the tiebreaker test worth running]

Tool Integrations

For implementation, see the tools registry. Key tools:

Tool Best For MCP Guide
PostHog First-party attribution, identify/merge, funnels - posthog.md
GA4 Web analytics, model comparison, user-id stitching ✓ ga4.md
Dub Short-link + click attribution ✓ dub-co.md
Segment CDP — route identify/track to every destination - segment.md
HubSpot CRM lead-source + self-reported fields ✓ hubspot.md
Salesforce CRM as revenue source of truth - salesforce.md
Supermetrics Pull platform numbers into one place to reconcile ✓ supermetrics.md
RB2B De-anonymize B2B website visitors - rb2b.md

  • analytics — event tracking, tracking plans, UTMs, GA4/GTM setup. Do this before attribution.
  • ads — ad-platform pixels, CAPI, server-side conversion tracking (references/conversion-tracking.md).
  • revops — pipeline stages, lead lifecycle, CRM revenue reporting. Attribution feeds it.
  • ai-seo — the AI-search attribution blind spot in depth.
  • ab-testing — controlled experiments; the incrementality mindset applied to on-site changes.
1---
2name: attribution
3description: When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions "attribution," "attribution model," "first-touch vs last-touch," "multi-touch," "which channel drives revenue," "what's my real CAC," "my dashboards disagree," "Google/Meta says X but GA says Y," "media mix model," "MMM," "incrementality," "geo lift," "holdout test," "how did you hear about us," "self-reported attribution," "dark social," or wants to instrument attribution themselves — "stitch my bookings to their source," "SavvyCal/Calendly attribution," "close the identify gap," "track conversions on a third-party domain," "first-party / self-hosted attribution." For event tracking setup and UTMs, see analytics. For ad-platform pixels/CAPI, see ads. For pipeline and CRM revenue reporting, see revops. For the AI-search attribution blind spot, see ai-seo.
4metadata:
5 version: 1.1.0
6---
7 
8# Attribution
9 
10You help users answer the hardest question in marketing: **which of my efforts actually caused this conversion and this revenue?** Attribution is where marketers lose the most money — to channels that look good in one dashboard and terrible in another, to "direct" and "branded search" that hide the real source, and to models that quietly encode an opinion as if it were fact.
11 
12This skill has two pillars. Know which one the user needs before you dive in:
13 
14- **(A) Interpretation** — choosing an attribution model, picking a measurement approach, and *reconciling the conflicting numbers* your tools report. This applies to everyone, even with zero engineering.
15- **(B) Own your attribution (first-party)** — instrumenting and stitching attribution *yourself* when you control the site/app. This is the build track. Use it when the user says "I want to track this myself" or is hitting a conversion that lives on a domain they don't own.
16 
17Most requests start with (A). Reach for (B) only when they control the surface and want to build.
18 
19Product context: check for `.agents/product-marketing.md` and read it if present — business type, sales cycle, and primary conversion drive almost every recommendation here.
20 
21## Boundaries — what this skill does NOT own
22 
23State these up front so you don't rebuild neighboring skills:
24 
25- **General event tracking, tracking plans, UTM setup, GA4/GTM** → **analytics**. Attribution *assumes tracking exists*. The line: analytics = "what events and how to fire them"; attribution = "how touches join to conversions and survive to revenue."
26- **Ad-platform pixels, CAPI, server-side conversion tracking** → **ads** (`references/conversion-tracking.md`). Attribution consumes platform-reported numbers and corrects for their bias; it doesn't set up the pixels.
27- **Pipeline stages, lead lifecycle, CRM revenue dashboards** → **revops**. Attribution feeds pipeline data; it doesn't define stages.
28- **Showing up in / measuring AI search** → **ai-seo**. Attribution names AI traffic as a blind spot only.
29 
30---
31 
32## Pillar A — Interpretation
33 
34### 1. What attribution can and can't tell you
35 
36Set expectations before touching a number:
37 
38- **Attribution is directional, not truth.** It's a model of causality built from incomplete data (cookies expire, sessions fragment, offline touches vanish, people research on one device and buy on another). Treat it as a strong hint, never a verdict.
39- **Every model is an opinion.** "First-touch" says the first ad gets all the credit; "last-touch" says the closing click does. Both are wrong in opposite directions. Choosing a model is choosing whose story to believe — say so out loud.
40- **The attribution gap is normal.** The sum of channel-reported conversions almost always exceeds real conversions, because every platform claims credit for the same sale. Your job is to shrink and explain the gap, not to make the numbers tie out perfectly. They won't.
41 
42When a user demands one true number, reframe: "We can get you a *defensible, consistent* number and a read on which channels are trending up. A single objective truth doesn't exist — here's why, and here's what we use to make decisions anyway."
43 
44### 2. Attribution models
45 
46The six standard models and when each one lies:
47 
48| Model | Credit rule | Best for | How it lies |
49|---|---|---|---|
50| **First-touch** | 100% to the first known touch | Top-of-funnel / demand-gen valuation; short cycles | Ignores everything that closed the deal; over-credits awareness channels |
51| **Last-touch** | 100% to the last touch before conversion | Direct-response, quick e-comm | Over-credits bottom-funnel + branded search/direct; ignores what created demand |
52| **Last non-direct** | 100% to last touch, skipping "direct" | A cheap fix for direct pollution | Still single-touch; just moves the blind spot |
53| **Linear** | Equal credit to every touch | Long, multi-touch journeys where every step matters | Treats a throwaway visit like a demo; flatters high-frequency channels |
54| **Time-decay** | More credit to touches nearer conversion | Longer cycles where recency matters | Under-credits the top of funnel; still an assumption, not a measurement |
55| **Position-based (U-shaped)** | 40% first, 40% last, 20% middle | B2B with clear "created" + "closed" moments | The 40/40/20 split is arbitrary; middle touches get shortchanged |
56| **Data-driven (algorithmic/Shapley)** | Credit from modeled marginal contribution | High-volume accounts with enough conversions | A black box; needs volume; can't see offline/dark touches it was never fed |
57 
58**Rules of thumb:**
59- Never report a single model in isolation for a long sales cycle. Show **first-touch and last-touch side by side** — the truth lives between them, and the gap between them *is* the insight.
60- Data-driven attribution needs volume (Google Ads historically gated it behind ~3,000 ad interactions and ~300 conversions in 30 days; it has since relaxed the minimums and made DDA the default, but low volume still makes it noise dressed as science). Use position-based instead when you're thin.
61- The model matters far less than being **consistent** and pairing it with an out-of-model sanity check (Pillar A §4, self-reported).
62 
63For the model math, worked examples of one journey scored six ways, and Shapley explained plainly, see `references/attribution-models.md`.
64 
65### 3. The three measurement paradigms
66 
67Models split credit *within* your tracked data. Paradigms are how you get at *causality* — increasingly rigorous, increasingly expensive:
68 
69| Paradigm | What it is | Answers | Needs | Watch out |
70|---|---|---|---|---|
71| **MTA** (multi-touch attribution) | Stitch user-level touches, apply a model | "Which touchpoints appear on converting journeys?" | Clean cross-device user-level tracking | Cookie loss + privacy have gutted user-level data; it silently under-measures |
72| **MMM** (media/marketing mix modeling) | Top-down regression of spend vs. outcomes over time | "What's each channel's aggregate contribution, including offline/brand?" | 2–3 yrs of weekly data, spend variation | Correlational; slow to react; needs real budget swings to learn |
73| **Incrementality** (geo holdout, PSA, ghost ads, on/off) | Controlled experiment: exposed vs. withheld | "Did this channel *cause* lift I wouldn't have gotten anyway?" | Ability to withhold; enough volume for significance | The gold standard, but you can only test a few things at a time |
74 
75**How to choose:** small budget / short cycle → good UTM + last-non-direct + a self-reported survey beats a fancy model. Mid budget, several channels → MTA for day-to-day + periodic incrementality tests on your biggest line items. Large budget, offline + brand spend → MMM for the portfolio + incrementality to validate MMM's coefficients. Incrementality is the tiebreaker whenever two channels both claim the same conversions.
76 
77Decision table by budget × sales cycle × channel count, and how to *read* a geo-holdout / PSA test (not a stats tutorial), in `references/measurement-paradigms.md`.
78 
79### 4. Self-reported attribution
80 
81The most underused signal, and often the most honest for long cycles and dark social. A post-conversion "How did you hear about us?" survey catches what tracking structurally cannot: podcasts, word of mouth, Slack communities, a founder's tweet, "a friend told me."
82 
83- **When it beats tracking:** long consideration cycles, high word-of-mouth, brand/community-led, or heavy dark-social (see §5). If a big slice of your journeys are "direct," you have a self-reported-shaped hole.
84- **Ask at the moment of conversion** (signup, first purchase, demo request) — highest recall, before memory fades.
85- **Wording:** open-ended ("How did you first hear about us?") captures dark social; a short pick-list is easier to quantify but pre-biases the answer. Best practice: pick-list of your known channels **plus a free-text "other/tell us more."**
86- **Treat it as a triangulation input, not gospel** — recall is fuzzy and people credit the *memorable* touch, not the first. It's the out-of-model check that keeps your tracked models honest.
87- On the build side, this is a form field written to your CRM/analytics as a person property — see Pillar B and `references/first-party-tracking.md`.
88 
89### 5. Reconciling conflicting sources
90 
91The request behind most attribution work: **"Google says 50, Meta says 40, GA says 60, my CRM says 35 — who's right?"** Nobody is. Here's the framework.
92 
93**Why each source systematically lies:**
94 
95| Source | Biased toward | Because |
96|---|---|---|
97| **Ad platforms** (Google/Meta/LinkedIn) | Over-counts *itself* | Claims view-through + click conversions in its own window; every platform counts the same sale; motivated to look good |
98| **GA / web analytics** | Last non-direct click | Loses cross-device, loses cookie-blocked users, dumps the unknown into direct |
99| **CRM** | Whatever the rep typed / the form captured | Human entry, lead-source overwrites, offline deals with no digital trail |
100| **Self-reported survey** | The *memorable* touch | Recall bias; under-counts boring-but-real touches like retargeting |
101 
102**How to triangulate:**
1031. **Pick one source of truth for the conversion count** — usually your CRM or backend (the system where money is real). Everything else explains *where those came from*, they don't get to redefine *how many*.
1042. **Never sum across platforms.** If Google and Meta both claim a conversion, you have one conversion with two claimants, not two conversions. De-dupe against the source-of-truth total.
1053. **Read directional agreement, not absolute match.** If every source says paid search is up and organic is down this quarter, that trend is trustworthy even though no two numbers match.
1064. **Use self-reported as the tiebreaker** when platforms fight over the same conversions, and **incrementality** when the stakes justify a test.
1075. **Expect and budget for the gap.** Report "platforms claim N; we can verify M; the delta is over-claiming + view-through + untracked — here's our best allocation."
108 
109The output is an honest allocation with confidence levels, not a false reconciliation to the decimal.
110 
111### 6. The blind spots
112 
113Where conversions hide, making real channels look weak:
114 
115- **Direct** — the junk drawer. Bookmarks and typed URLs, yes, but also stripped referrers, app-to-web, dark social, and any touch your tracking dropped. A large direct share is a *measurement* problem, not a channel.
116- **Branded search** — people who discovered you elsewhere and Googled your name. Last-touch hands the credit to paid/organic *branded* search; the real driver was whatever made them search. Segment branded vs. non-branded or you'll defund the top of funnel.
117- **Dark social** — sharing that carries no referrer: DMs, Slack/Discord, podcasts, newsletters, screenshots. Structurally invisible to tracking; self-reported is the only way to see it (§4).
118- **AI traffic** — assistants and AI search increasingly influence buyers, then send them via branded search or direct, so the AI touch is invisible in analytics. Name it and hand deeper work to **ai-seo**.
119 
120The through-line: **when "direct" and "branded search" dominate, your top of funnel is working and your attribution is hiding it.** Say that explicitly — it's the single most common misread in marketing.
121 
122### 7. Business-type fork
123 
124Defaults differ sharply. Summary here; full playbooks in `references/by-business-type.md`.
125 
126- **B2B SaaS (long cycle, sales-assisted):** journeys span weeks–months and multiple people, so single-touch models mislead badly. Anchor on the **CRM as source of truth**, use **first-touch + position-based** side by side, lean hard on **self-reported at demo/signup**, and treat **pipeline/revenue** attribution (→ revops) as the real scoreboard. Offline touches (events, sales convos) make MTA weakest and self-reported strongest here.
127- **Ecommerce / DTC (short cycle, self-serve):** fast journeys, high volume, spend concentrated in paid social + search. Anchor on **platform ROAS but distrust it** (iOS/CAPI inflation), validate with **MMM once spend is material** and **incrementality/geo-holdouts** on your biggest channels, and use a **post-purchase survey** to catch what pixels miss. Last-touch is defensible for quick-turn SKUs; MMM+incrementality is how you allocate the real budget.
128 
129---
130 
131## Pillar B — Own your attribution (first-party)
132 
133Use this when the user **controls the site/app** and wants to instrument attribution themselves — especially for a conversion that happens on a **domain they don't own** (a SavvyCal/Calendly/Cal.com booking, a Stripe Checkout page). This pillar is grounded in real production builds; the full runbook with code patterns is in `references/first-party-tracking.md`. The essentials:
134 
135### The identity graph
136 
137First-party attribution is one idea: **join anonymous browsing to the eventual conversion.**
138 
1391. A visitor arrives anonymously; your analytics tool assigns an **anonymous `distinct_id`** and stamps **first-touch properties** (`$initial_referrer`, `$initial_utm_*`) on their events.
1402. At conversion (signup, booking, purchase) you call **`identify()`** with a stable id (email or user UUID). This **merges** the anonymous history into a known person — first-touch now survives all the way to the conversion.
1413. Every conversion event can now be broken down by first-touch channel. That's the whole game.
142 
143### Closing the `identify()` gap
144 
145The most common first-party failure: **nothing ever calls `identify()`**, so conversions never join to browsing history and every customer looks like they appeared from nowhere. (Framing adapted from Tessa Kriesel's PostHog approach.) The fix is to call identify at each real conversion. **Audit first** — many SaaS apps already identify at signup; don't rebuild what works. Find the *specific* un-instrumented conversions and close only those.
146 
147### Stitching conversions on a third-party domain
148 
149The one case that needs real machinery: a conversion that completes on a domain you don't control (a booking tool, a hosted checkout). You can't run your analytics there, so:
150 
1511. **At click time**, a capture-phase link decorator appends the visitor's anonymous `distinct_id` to the outbound URL via the tool's **metadata passthrough** (e.g. `?metadata[ph_distinct_id]=<id>`). One document-level listener covers every CTA — no per-link edits.
1522. The third-party tool stores that metadata and returns it in its **webhook**.
1533. Your **webhook handler** fires an **identity merge** (`$identify` with the booking email as `distinct_id` and the smuggled anonymous id as `$anon_distinct_id`) plus a **conversion event** — joining the booking back onto the marketing journey.
154 
155### Guardrails (do not skip)
156 
157- **Anonymity guard — fail closed.** Only ever smuggle the *anonymous* id. After `identify()`, the current id becomes the user's email/UUID; leaking that into a third-party URL or merging on it corrupts profiles (person A's email folds into whoever books). Reject ids that look like PII (contain `@`), cap length, and when identity is ambiguous, **send nothing**. If the app identifies by UUID, test `distinct_id === device_id` rather than an `@` check.
158- **First-touch data quality.** Redirects overwrite the true first touch. Exclude OAuth/checkout referrers (`accounts.google.com`, `checkout.stripe.com`, `login.*`), your own subdomains (self-referrals), and dev hosts (`localhost`) from referrer classification. This is usually a settings change, not code, and it's the highest-trust-per-effort fix.
159- **Cross-subdomain stitching.** Marketing site → app on a subdomain must share one analytics project + a cross-subdomain cookie, or the journey breaks at the handoff. Expect **near-zero numbers until the stitch is verified in prod** — don't panic at empty data; use a campaign-window heuristic fallback and backfill the pre-stitch cohort in the meantime (details in the reference).
160 
161### Reporting and the last mile
162 
163The first payoff is one insight: your **conversion event broken down by first-touch channel** (`$initial_utm_source` / `$initial_referring_domain`), and — joined to revenue — **channel → conversion → revenue**. Confirm first-touch vs. last-touch config in the tool (many default to last-touch; first-party attribution wants `$initial_*`).
164 
165But first-touch alone can't run the multi-touch models from §2. **Store the full ordered touch path** (not just `$initial_*`) and the build track feeds the interpretation track — you can score your own journeys position-based / linear / time-decay instead of only reading about them.
166 
167**The last mile — get it into the CRM** (production refinement from Tessa Kriesel). A breakdown in an analytics tool is a report; sales and lifecycle act on attribution *written onto the record*. Sync a **`source` field with `confidence` and `basis`** (journey-linked vs self-reported vs campaign-window fallback) plus a **Paid-vs-Organic read** off the medium, **rolled up to the account** (not just the contact — one B2B org is several people with mixed work/personal emails). How pipeline/lifecycle then *use* it is **revops**' job.
168 
169The pattern is tool-agnostic: identify + merge exists in PostHog, Segment, Amplitude, and via user-id in GA4; the third-party stitch works with any tool that has a metadata passthrough + webhook. PostHog + SavvyCal are the worked example in `references/first-party-tracking.md`.
170 
171---
172 
173## Output format
174 
175Deliver an **attribution readout**, not a data dump:
176 
177```markdown
178# Attribution Readout — [date]
179 
180## The question
181[What decision this informs — e.g. "where should next quarter's budget go?"]
182 
183## Source of truth
184[Which system defines the conversion count, and why]
185 
186## What each source says
187| Channel | Platform-reported | GA | CRM | Self-reported | Our read |
188|---------|------------------|----|----|--------------|----------|
189[De-duped against source of truth; not summed]
190 
191## Model comparison (for long cycles)
192[First-touch vs last-touch side by side; the gap is the insight]
193 
194## Confidence & gaps
195[The attribution gap, the blind spots, what we can't see]
196 
197## Recommendation
198[Allocation call with confidence levels; the tiebreaker test worth running]
199```
200 
201## Tool Integrations
202 
203For implementation, see the [tools registry](../../tools/REGISTRY.md). Key tools:
204 
205| Tool | Best For | MCP | Guide |
206|------|----------|:---:|-------|
207| **PostHog** | First-party attribution, identify/merge, funnels | - | [posthog.md](../../tools/integrations/posthog.md) |
208| **GA4** | Web analytics, model comparison, user-id stitching | ✓ | [ga4.md](../../tools/integrations/ga4.md) |
209| **Dub** | Short-link + click attribution | ✓ | [dub-co.md](../../tools/integrations/dub-co.md) |
210| **Segment** | CDP — route identify/track to every destination | - | [segment.md](../../tools/integrations/segment.md) |
211| **HubSpot** | CRM lead-source + self-reported fields | ✓ | [hubspot.md](../../tools/integrations/hubspot.md) |
212| **Salesforce** | CRM as revenue source of truth | - | [salesforce.md](../../tools/integrations/salesforce.md) |
213| **Supermetrics** | Pull platform numbers into one place to reconcile | ✓ | [supermetrics.md](../../tools/integrations/supermetrics.md) |
214| **RB2B** | De-anonymize B2B website visitors | - | [rb2b.md](../../tools/integrations/rb2b.md) |
215 
216---
217 
218## Related Skills
219 
220- **analytics** — event tracking, tracking plans, UTMs, GA4/GTM setup. Do this *before* attribution.
221- **ads** — ad-platform pixels, CAPI, server-side conversion tracking (`references/conversion-tracking.md`).
222- **revops** — pipeline stages, lead lifecycle, CRM revenue reporting. Attribution feeds it.
223- **ai-seo** — the AI-search attribution blind spot in depth.
224- **ab-testing** — controlled experiments; the incrementality mindset applied to on-site changes.
225 
View all files on GitHub →

Details

Updated
Sep 5, 2026
License
MIT
Stars on the repo
★ 51,120
Checked
Source
coreyhaines31/marketingskills ↗
Creator
coreyhaines31 · 62 listings
View creator

Similar skills

See all →
SkillPaste the sales and spend numbers each ad platform claimsAttribution AuditAgriciDaniel/claude-ads · by AgriciDanielPaste the sales and spend numbers each ad platform claims, and get back a plain explanation of why they disagree and which figure to trust.★ 9.5k GitHub starsSkillSet up, audit, or optimize analytics trackingkostja94/marketing-skills · by kostja94When the user wants to set up, audit, or optimize analytics tracking (GA4, events, conversions). Also use when the user mentions "Google Analytics," "GA4," "event tracking," "conversions," "attribution model," "gtag," "data layer," "GA4 setup," "conversion tracking," "event setup," "User ID tracking," or "CTA attribution." For traffic insights, use traffic-analysis.★ 1k GitHub starsSkillSet up first-party tracking and analytics1P Tagging & AnalyticsLeadMagic/gtm-skills · by LeadMagicSet up first-party tracking and analytics — website pixels, conversion tracking, UTM architecture, cookie consent, server-side tagging vs client-side, 1P vs 3P data strategy, and identity resolution. Use when setting up tracking, implementing pixels, building attribution, or preparing for privacy-first measurement. Triggers on: "pixel", "tracking", "conversion tracking", "first-party data", server-side tagging", "UTM", "cookie consent", "1P vs 3P", "identity resolution", or any tracking implementation request.★ 62 GitHub starsSkillSet up, improve, or audit analytics tracking and measurementcoreyhaines31/marketingskills · by coreyhaines31When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For choosing attribution models, comparing multi-touch/MMM/incrementality, or reconciling conflicting numbers across tools, see attribution. For A/B test measurement, see ab-testing.★ 51.1k GitHub starsSkillSet up, improve, or audit analytics tracking and measurementdavila7/claude-code-templates · by davila7When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.★ 32.3k GitHub starsMCPMarketes attribution analyst with incrementality testingMarketing attribution analystdavila7/claude-code-templates · by davila7Use when you need to model multi-touch attribution, measure marketing mix impact, validate channel performance with incrementality testing, or optimize budget allocation across paid/owned/earned channels. Specifically:\\n\\n<example>\\nContext: A DTC brand spends across paid search, paid social, and email but can't tell which channels are actually driving incremental revenue versus just claiming credit for conversions that would have happened anyway.\\nuser: "Our last-click attribution says paid social drives 40% of revenue, but we're not sure that's real. How do we find out?"\\nassistant: "I'll first confirm your tracking stack (GA4/GTM/CDP), attribution window, and available spend/conversion data. Then I'll build a multi-touch attribution query alongside a geo-based incrementality test to validate whether paid social's credited revenue reflects true incremental lift or is displacing organic/brand-search conversions. I'll triangulate the MTA output against the incrementality result before recommending any budget shift."\\n<commentary>\\nUse marketing-attribution-analyst when the question is specifically about cross-channel credit assignment and causal validation of marketing spend. This differs from content-marketer (which measures content-specific engagement/ROI for a single content program) and market-researcher (external market sizing/customer research) — this agent works with the company's own tracking and spend data to answer "which channel/touchpoint gets credit, and is that credit real."\\n</commentary>\\n</example>\\n\\n<example>\\nContext: A mid-market SaaS company with $2M/year in marketing spend wants to move from last-click attribution to something more defensible before their next board budget review.\\nuser: "We need a real methodology to justify our channel budget split to the board next quarter. What should we actually use?"\\nassistant: "Given your spend level, I'll recommend a triangulated approach: a lightweight Bayesian MMM (e.g., Google Meridian) for strategic quarterly allocation, incrementality/holdout tests on your top 2-3 channels for causal validation, and multi-touch attribution for tactical, campaign-level optimization in between. I'll ask for your historical spend/conversion data and current tracking setup before building anything."\\n<commentary>\\nUse marketing-attribution-analyst for measurement-strategy decisions (which methodology fits the business's spend level and data maturity), not just for running one specific model. It differs from business-analyst, which focuses on broader operational/process data rather than marketing-channel causal measurement.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: A retailer's GA4 attribution numbers shifted significantly after a tracking migration and marketing wants to know if the channel mix actually changed or if it's a measurement artifact.\\nuser: "Our GA4 numbers look totally different since we migrated our tagging setup last month. Did our channel mix actually shift, or is this a tracking issue?"\\nassistant: "I'll ask what changed in the migration (consent mode configuration, server-side tagging, conversion API setup) and pull the pre/post data. I'll check for signal-loss patterns consistent with consent or tagging gaps versus a genuine behavioral shift, and validate any real shift with an incrementality read before you act on the new numbers."\\n<commentary>\\nUse marketing-attribution-analyst for diagnosing tracking/measurement integrity issues that affect attribution output, not just building new models. Always distinguish a real channel-mix shift from a data-quality artifact before recommending action.\\n</commentary>\\n</example>★ 32.3k GitHub stars

More from coreyhaines31

SkillTell us about your business and who you sell toA Free Giveaway That Grows Your Email Listcoreyhaines31/marketingskills · by coreyhaines31Tell us about your business and who you sell to, and get back a ready-to-launch free offer that turns website visitors into email signups and future customers.★ 51.1k GitHub starsSkillPlan, design, or implement an A/B test or experimentA/B Test Setupcoreyhaines31/marketingskills · by coreyhaines31When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro.★ 51.1k GitHub starsSkillGenerate, iterate, or scale ad creativecoreyhaines31/marketingskills · by coreyhaines31When the user wants to generate, iterate, or scale ad creative — headlines, descriptions, primary text, or full ad variations — for any paid advertising platform. Also use when the user mentions 'ad copy variations,' 'ad creative,' 'generate headlines,' 'RSA headlines,' 'bulk ad copy,' 'ad iterations,' 'creative testing,' 'write me some ads,' 'Facebook ad copy,' 'Google ad headlines,' 'LinkedIn ad text,' 'static ads,' 'ad templates,' 'iMessage ad,' 'chat reveal ad,' 'ChatGPT ad,' 'Apple Notes ad,' 'AirDrop ad,' 'creative strategy,' 'creative roadmap,' 'creative retro,' 'hook writing,' 'creative review page,' 'present ad creative for approval,' 'motion video ad,' 'faceless video ad,' 'UGC ad,' 'greenscreen ad,' 'TikTok/Reels ad format,' 'which ad format to make,' 'Meta ad format tier list,' or 'creative format taxonomy.' Use this whenever someone needs to produce ad copy at scale or iterate on existing ads. For campaign strategy and targeting, see ads. For landing page copy, see copywriting.★ 51.1k GitHub starsSkillBusiness-brainstorm — Pressure-test a business ideacoreyhaines31/makerskills · by coreyhaines31When you want to pressure-test a potential new business, product, or side project against the serial-founder filter. Not "marketing ideas for a product" (that's marketing-skills:marketing-ideas) — this is "should this business exist + can you win it." Runs the idea through a structured framework (problem, audience, wedge, monetization, moat, portfolio fit, distribution, energy fit, opportunity cost), checks domain availability via /domain, optionally triggers /deep-research for market validation, and outputs a viability brief: build / sleep on it / pass. Archives every idea to ~/.config/makerskills/business-brainstorm/archive/ so past work is searchable. Triggers on "/business-brainstorm," "/brainstorm," "new business idea," "should I build X," "pressure test this idea," "validate this idea," "is X a good business," "what about a [type] for [audience]."★ 855 GitHub starsSkillYour team's shared, AI-ready knowledge base/company-brain — Team-shared AI-ready knowledge basecoreyhaines31/makerskills · by coreyhaines31Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANY_BRAIN_VAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X.★ 855 GitHub starsSkillMonthly CFO workflow for a company or agency/company-cfo — Monthly company CFO workflowcoreyhaines31/makerskills · by coreyhaines31Monthly CFO workflow for a company or agency — pull raw data from bank + payment processor + payroll + expense management, categorize and reconcile, compute end-of-month cash via transaction-sum method, update a scenario projector for forward forecasting, write the monthly snapshot report, surface decisions to leadership. Modes — monthly (default; the standing report), weekly (thin cash pulse), scenario (ad-hoc modeling in the projector), pickup (resume where the prior run left off). Anonymized team-scope sibling to personal-cfo (which handles personal household finances). Composes with company-brain (report gets stored + wiki-indexed there), toolify (wire company-specific data sources), loopify (schedule the monthly + weekly runs). Triggers on "/company-cfo," "/cfo," "monthly cash report," "do the CFO snapshot," "CFO monthly," "let's run CFO," "cash projection," "runway forecast," "monthly financials," "cash pulse.★ 855 GitHub stars