valrune/data
all work
attribution modeling, two scales

Attribution: recovering the map between spend and revenue

Every business believes it knows where its revenue comes from, and almost none can prove it. These two builds, a regional home-services contractor and a global enterprise, replaced belief with a warehouse: multi-signal attribution on one side, data-driven attribution across millions of stitched touches on the other.

stack:bigquery · idr · markov dda
focus:attribution modeling
scope:smb to global enterprise
100%[ google-visible revenue tracked ]smb contractor
3x[ more revenue traced to ads ]smb · 8.8% → 26.5%
3.1M[ touchpoints reconnected ]enterprise
5[ dda machine-learning models ]enterprise

What attribution is, and why it matters

Attribution is the practice of assigning credit for a conversion across the marketing touches that preceded it. It matters because budget decisions depend on it. If you cannot see which touches contributed to revenue, you cannot know what to fund. Most businesses attribute by habit, a last-click rule or a hand-typed lead-source field, and get a distorted picture.

Doing it well starts with the journey: the ordered set of touches a person or account had before converting, stitched together by identity resolution. A stage window defines how far back a touch can sit and still earn credit for a given stage, for example from first anonymous visit to MQL, then MQL to opportunity, then opportunity to closed won. Windowing keeps a touch from a year ago out of this month's close.

Rule-based models apply a fixed shape regardless of the data. Data-driven attribution learns the shape from the data itself. Two common engines: a Markov model treats the journey as a chain of states and measures each channel's contribution by removal effect, how much conversion probability drops when that channel is taken out of the chain; a logistic regression estimates each touch's marginal effect on the probability of conversion. Both replace opinion with a fitted weight.

The shape each model draws

Sample distributions, not real data, across a five-touch journey. Rule-based models apply a fixed shape; data-driven models learn one from the data.

first touchall credit to the opening touch; ignores everything that closed the deal
last touchall credit to the final touch; ignores everything that started it
linearcredit split evenly; treats a filler touch like a decisive one
position-based (u)weights the first and last touch, splits the rest; rewards opening and closing
w-shapedweights first touch, lead creation, and opportunity creation
time decaymore credit the closer a touch sits to the conversion
reverse time decaymore credit the earlier a touch sits; useful for demand creation
data-driven (dda)credit learned from what correlates with conversion; no fixed shape
illustration: credit distribution per attribution model

Each shape encodes an assumption. First and last touch throw away most of the journey. Linear treats a filler touch like a decisive one. Position-based and W-shaped hard-code which positions matter. Time-decay and its reverse pick a direction to favor. A modified model bends a rule toward a preference: modified last touch, for example, credits the last touch overall, except it will skip a channel you deprioritize, such as direct or organic, and award the last touch among your preferred channels instead. Data-driven attribution avoids the fixed shape and fits credit to what correlates with conversion.

[ scale one: the contractor ]

The CRM said ads did almost nothing. The CRM was wrong.

Before the build, the contractor's only attribution was a hand-typed lead-source field in the CRM. It credited ads with 8.8% of won revenue. Their CRM tracking practices were getting worse over time, as rough staffing decisions on their side left the field half-filled, and by the post period it attributed exactly zero deals. The warehouse rebuilt attribution from signals that do not depend on anyone remembering to type: call-tracking sources, click IDs recovered through the identity graph, GA4 client IDs, and UTMs, so results held up in spite of the CRM drift.

After the build, 26.5% of won revenue traces to a paid origin, three times what the old field ever showed. Roughly 43% of revenue has no digital footprint at all, from walk-ins, referrals, and mailers, so it can never be matched to a click. Of the revenue that Google can see, the warehouse now feeds back effectively 100%. The often-quoted 57.2% figure is that Google-visible revenue expressed as a ratio of all revenue across every source. In the same window, the monthly deal rate rose 38.6%.

Won-revenue visibility, by method and period

Share of won revenue attributable to ads. The CRM field decayed to zero; warehouse attribution rose as capture improved, reaching three times the visibility the business had ever had.

metric: % of won revenue attributed · source: crm, warehouse attribution layer

Which signal attributed the deals

Share of ad-attributed deals by winning signal, after the build. Call tracking carried the load (red), as this is a phone-first business, while the CRM's native field attributed none.

metric: % of ad-attributed deals per signal · source: warehouse attribution layer
[ scale two: the enterprise ]

Data-driven credit vs the linear baseline

The global enterprise had the opposite problem: many signals, all credited naively. Even-credit attribution spread weight across every touch in a journey, flattering channels that appear often but rarely move a deal. The build replaced it with data-driven attribution: a fitted model per funnel stage, from marketing-qualified lead through sales acceptance and qualification to opportunity created, each trained on journeys the identity layer reconnected.

Each model learns which channels actually predict a lead advancing to that stage, then distributes each journey's credit by counterfactual removal effect: how much the predicted probability drops when a channel is taken out. Running it side by side with linear is the honest way to ship it, because the deltas, not the absolute numbers, are where the budget argument lives.

DDA vs linear: credit share at opportunity created

Share of stage credit per channel under the even-weight linear baseline (gray) and the fitted DDA model (yellow). DDA concentrates credit on paid and organic search, the channels that predict a journey reaching an opportunity, and strips it from broad-reach paid, direct, and sales touches that show up often without moving the odds.

metric: % of stage credit per channel, opportunity-created stage · source: dda layer, stage-level logistic models

The re-pricing holds at every stage

Credit-share shift, DDA minus linear, in points of stage credit. Paid search gains credit at every stage up to opportunity created; broad-reach paid loses roughly eleven points everywhere. A one-stage fluke would be noise; the same shift four stages in a row is a finding.

metric: dda credit share minus linear credit share, per stage · source: dda layer

Linear flattered broad-reach campaigns because they touch nearly every journey. The fitted models found that presence is not influence: those touches barely changed the probability of a lead advancing, while search touches, paid and organic, changed it a lot. The shift is consistent at every stage up to opportunity creation, which is what makes it safe to act on.

[ the credit, drawn as a sky ]

Where credit moves as the model changes

The same enterprise credit, plotted as a constellation. Each star is a channel that appeared on journeys reaching an opportunity, sized by its share of stage credit under the model you pick. Step from first touch through last touch and linear to the fitted models and watch weight drain out of broad-reach paid, direct, and sales touches and pool into search. Gold marks a channel data-driven attribution lifts against linear, burgundy one it cuts.

Touchpoint constellation

Star size = share of opportunity-created credit under the selected model. First and last touch are single-touch splits over the same journeys; links are illustrative journey co-occurrence, not a fitted transition matrix.

[ credit model ]
dda lifts creditdda cuts credit~unchanged· star size = share of stage credit · click a star
metric: % of stage credit, opportunity-created stage · source: dda layer (illustrative links)
100%[ google-visible revenue tracked ]smb contractor
3x[ more revenue traced to ads ]smb · 8.8% → 26.5%
3.1M[ touchpoints reconnected ]enterprise
5[ dda machine-learning models ]enterprise