Shapley Attribution Visualizer
Understand how cooperative game theory assigns "fair credit" to marketing channels by analyzing their marginal contribution across every possible coalition combination.
OVERVIEW & WHAT THIS TOOL SOLVES
Customers rarely buy after a single ad click—a shopper might discover your brand on Paid Social, research via Paid Search, and convert after a Retargeting Display ad. Naive attribution rules like First-Touch or Last-Touch give 100% of the credit to one endpoint and starve the upper- or mid-funnel channels that assisted the sale. Shapley Value Attribution applies the Shapley value from cooperative game theory (Lloyd Shapley, 1953) to compare every possible coalition of channels and award each touchpoint its exact average marginal contribution to conversion.
🎯 Questions It Answers
- How much conversion credit does each channel deserve after accounting for all multi-touch interactions?
- Which channels act as essential "synergy catalysts" that boost conversion rates when paired with others?
- Which channels look strong under Last-Touch only because they poach customers who were already going to buy?
📂 What Data You Need
- Coalition Conversion Rates (or journey counts & conversions) for each observed subset of channels
- Channel Definitions (typically 3 to 5 core marketing channels such as Search, Social, Email, Display)
- No Organic Baseline (the tool sets the conversion rate for zero channels to 0%; uploaded rows with no recognized channel are excluded)
💡 What You'll Discover
- Shapley Attribution Shares: Fair-division credit weights that sum to 100% of total incremental value
- Heuristic Bias Comparison: Side-by-side gap between Shapley credit and the Last-Touch and Linear rules
- Coalition Marginal Lift Breakdown: Exact step-by-step table showing how much a channel adds when joining any existing subset
🔍 Key Nuances & Common Traps to Watch For
- Order-Invariance of Set Coalitions: Classic Shapley attribution treats a customer journey as an unordered set of channels (e.g., {Search, Social} = {Social, Search}). If sequence order matters critically, compare with a Markov Chain transition model.
- Selection Bias in Observational Paths: Observed coalition conversion rates reflect correlation, not automatically causal lift. If high-intent buyers naturally search your brand name right before purchasing, Search coalitions will show high conversion rates unless calibrated with incrementality experiments.
- Exponential Coalition Growth (2n): With 4 channels there are 16 coalitions; with 10 channels there are 1,024. Keep channel groupings at the strategic level (4–6 macro channels) so every coalition has enough customer journeys to estimate reliably.
📐 Under the Hood: Model Equations & Variable Definitions
1. Marginal Contribution of Channel i to Coalition S
💬 Read it in plain English: A channel's marginal contribution to any existing team of channels is simply the total conversion value when that channel is added minus the conversion value that the team achieved without it.
2. Shapley Value Fair-Credit Equation
💬 Read it in plain English: A channel's Shapley value is the weighted average of its marginal contribution across every possible coalition it could join, weighting each coalition by the fraction of all possible channel arrival orders in which that exact coalition precedes channel i.
MARKETING SCENARIOS & DATA SOURCE
Use a Marketing Case Study
5 Guided CasesUpload Custom Journey Data
CSV Import
Upload customer journey logs with columns Path_ID (nominal identifier),
Channel_Sequence (categorical sequence separated by -> or , using
search, social, displayA, displayB, email),
and binary outcome Converted (1 = converted, 0 = did not convert).
Drag & drop a journey CSV file here, or click to browse
Supports .csv or .tsv (recommended 50+ tracked journeys)
⚙️ Simulation Parameters ▼
The seed starts at 42, so everyone who loads a case sees the same journeys. Enter another number (e.g. "123") and press Set for a different set.
1. RAW USER JOURNEYS
Before any math happens, we just have paths. The Scenario selected above determines both how journeys flow through the funnel and the rate at which each channel mix converts.
2. MEDIA MIX LAB (COALITION ANALYSIS)
Explore the Conversion Rate \(v(S)\) for specific definitions of "Channel Mix" (unordered sets of channels).
Current "Mix" Selection
Toggle channels to filter for this specific coalition \(S\) and see its conversion rate, sample support, and synergy bonus.
3. Synergy Analysis (The "Team Chemistry" Map)
Shapley isn't just about slicing the pie; it's about growing the pie. Use this heatmap of pairwise interaction \(I_{A,B} = v(\{A,B\}) - v(\{A\}) - v(\{B\}) + v(\emptyset)\) to spot which channel pairings create the most lift.
- Positive Synergy (Green, \(I_{A,B} > 0\)): Cooperative. "Search converts 2%, Social converts 2%, but TOGETHER they convert 6%." (Bonus = +2%).
- Negative Synergy (Red, \(I_{A,B} < 0\)): Redundant / Saturated. "Search converts 2%, Display converts 2%, but TOGETHER they still only convert 2.5%." (Cannibalization).
- Interactive Sync: Click any square in the heatmap to load that 2-channel pair directly into Section 2's Media Mix Lab!
4. Inside the Math (The Calculation)
See how we derive the exact Shapley value \(\phi_i\) for a specific channel across all \(2^{n-1} = 16\) baseline coalitions, grouped by coalition size \(|S|\).
This table shows every step of the exact Shapley equation. Because there are 5 channels, there are 5 coalition-size tiers (\(|S| = 0, 1, 2, 3, 4\)). Each size tier receives an equal \(1/5 = 20.0\%\) total weight, split evenly among the mixes of that size.
|
Existing Mix \(S\)
(Baseline channels before entry)
|
Base Rate \(v(S)\)
(Rate WITHOUT Paid Search)
|
New Rate \(v(S \cup \{i\})\)
(Rate WITH Paid Search)
|
Marginal Impact \(\Delta\)
(Lift from Paid Search)
|
Shapley Weight \(w(S)\)
(Exact combinatoric share)
|
Weighted Credit
(\(w(S) \times \Delta\))
|
|---|---|---|---|---|---|
| Final Shapley Value \(\phi_i = \sum w(S)\cdot\Delta_i(S)\): | \(\sum w = 100\%\) | -- | |||
🧮 Technical Deep Dive: The Shapley Equation & Equal Tier Weights (Click to Expand)
The Shapley Value comes from Cooperative Game Theory (Lloyd Shapley, 1953). It assigns credit based on a player's average marginal contribution across all possible coalitions (team combinations).
The original Shapley formula sums over all \(n!\) permutations (orderings), but this is just a mathematical device to derive fair weights—it does NOT mean actual customer journey timestamp order enters \(v(S)\). The final Shapley value depends only on which channels were present (the coalition), not the sequence they appeared in. That's why we group by coalition size \(|S|\) above.
- \(\phi_i\) = The Shapley Value (fair conversion rate credit) for channel \(i\)
- \(N\) = The set of all channels (e.g., \(\{\text{Search, Social, Display (Ad A), Display (Ad B), Email}\}\))
- \(n\) = Total number of channels (\(n = |N| = 5\))
- \(S\) = Any coalition (subset) that does NOT include channel \(i\)
- \(v(S)\) = Conversion rate when users saw the exact set of channels in \(S\)
- \(\overline{\Delta}_i^{(k)}\) = Average marginal lift of channel \(i\) across all \(\binom{n-1}{k}\) coalitions of size \(|S|=k\)
With \(n = 5\) channels, there are \(2^4 = 16\) baseline mixes without channel \(i\):
• Size \(|S|=0\): \(1\) mix (Empty) \(\times \frac{1}{5} (20.0\%) = 20.0\%\)
• Size \(|S|=1\): \(4\) single-channel mixes \(\times \frac{1}{20} (5.0\%) = 20.0\%\)
• Size \(|S|=2\): \(6\) two-channel mixes \(\times \frac{1}{30} (3.33\%) = 20.0\%\)
• Size \(|S|=3\): \(4\) three-channel mixes \(\times \frac{1}{20} (5.0\%) = 20.0\%\)
• Size \(|S|=4\): \(1\) four-channel mix \(\times \frac{1}{5} (20.0\%) = 20.0\%\)
Every team size gets an equal \(20\%\) vote!
5. Final Attribution Results & Budget Reallocation
Aggregating the Shapley Values \(\phi_i\) across all 5 channels (left) and decomposing where each channel earns its credit by coalition size \(|S|\) (right).
A. Total Shapley Credit & Share by Channel
Bar height = marginal conversion rate lift \(\phi_i\); label in parentheses = % share of total credit.
B. Where Credit Is Earned (By Coalition Size Tier \(|S|\))
Shows how much of each channel's Shapley value comes from Solo entry (\(|S|=0\)) vs. multi-channel teamwork (\(|S|\ge 1\)).
Model Comparison: Accuracy vs. Ego
Comparing Shapley (Colored Bars) against traditional Heuristic models (Linear Equal-Split and Last Touch) computed on the exact same converting journeys.
- Last Touch (Dark Slate): Awards 100% of every conversion to the final touchpoint before purchase—over-crediting bottom-funnel "Closers" (like Paid Search or AE Demo) and starving upper-funnel "Assists" (like Social or Trade Shows).
- Linear (Striped Slate): Spreads credit equally across every touchpoint on converting paths, ignoring whether a channel actually lifts conversion probability over baseline.
Junior analysts often pick the attribution rule that makes their own channel look biggest. Don't do this.
When you cut an "assist" channel that Last Touch undervalued, conversions in your "closer" channel collapse too. Use the Credit Shift chart and Budget Table below to spot where Last Touch misallocates spend.
Model Comparison (Scaled to Grand Coalition Lift)
The Misattribution Gap (Shapley Share % − Last-Touch Share %)
💰 Managerial Bridge: From Attribution Share to Budget & ROAS
Comparing current monthly spend against Last-Touch vs. Shapley attributed conversions and revenue.
| Channel | Monthly Spend (% Budget) | Last-Touch Share (Conv.) | Shapley Fair Share (Conv.) | Credit Shift (\(\Delta\) Share) | Last-Touch ROAS vs. Shapley ROAS | Budget Action |
|---|---|---|---|---|---|---|
| Select a scenario to view budget & ROAS reallocation analysis. | ||||||