Markov Chain Attribution Lab
Unlike game theory, Markov Chains care about Sequence. Analyze the "Customer Journey" as a network of probabilities, determining which steps act as the critical bridges to conversion.
OVERVIEW & WHAT THIS TOOL SOLVES
Last-Touch attribution gives 100% of conversion credit to the final click before checkout—starving upper-funnel channels like Paid Social or Display that introduced the customer and fed the search funnel. Unlike order-blind Shapley values, the Markov Chain Attribution Lab models customer journeys as a directed transition graph across touchpoint states and asks a sharp counterfactual question: if we silenced Channel k completely, what fraction of total conversions would vanish?
🎯 Questions It Answers
- What are the step-by-step transition probabilities from Start through each marketing channel to Conversion or Null (drop-off)?
- If we remove a specific channel from the network, how much does the system-wide conversion rate collapse (Removal Effect)?
- Which channels are over-credited by Last-Touch or First-Touch heuristics compared to sequence-aware Markov attribution?
📂 What Data You Need
- Customer Path Data: Ordered multi-touch sequences (e.g.,
Social → Email → Paid Search) with conversion/drop-off outcomes - Simulation or Preset Mode: Load a realistic multi-channel funnel scenario or generate synthetic customer paths
- Channel Removal Toggle: Click any channel node to simulate silencing it and watch path probabilities reroute live
💡 What You'll Discover
- Directed Transition Graph & Heatmap: State-to-state transition matrix
P_{ij}from Start to Conversion and Drop-Off - Counterfactual Removal Effect: Exact conversion collapse when each channel is redirected to the absorbing Null state
- Rule Comparison Chart: Side-by-side credit allocation across Markov, Last-Touch, First-Touch, and Linear rules
🔍 Key Nuances & Common Traps to Watch For
- First-Order Memorylessness (Markov Property): A first-order Markov chain assumes the probability of moving from State A to State B depends only on being in State A right now—not on which channels preceded A earlier in the journey.
- Why Raw Removal Effects Sum to More Than 100%: If every converting customer must pass through both Social and Paid Search, removing Social drops conversions by 100% and removing Search also drops conversions by 100%. Normalizing each channel's removal effect by the sum of all removal effects yields clean 100% credit shares.
- Observational Graph vs. Causal Incrementality: Redirecting silenced traffic to the Null state assumes customers who lose a touchpoint never find another route to your site; validate major budget reallocations with a geo-holdout or lift test.
📐 Under the Hood: Model Equations & Variable Definitions
1. First-Order Markov Transition Probability & Baseline Conversion Rate
💬 Read it in plain English: Each arrow's transition probability P_{ij} is the share of journeys at state i that move next to state j, and the overall baseline conversion rate P(Conv) sums the probabilities of all paths leading from Start to the absorbing Conversion state.
2. Channel Removal Effect (RE_k) & Normalized Markov Attribution Share
💬 Read it in plain English: We zero out channel k (redirecting all traffic entering k to Drop-Off) to see the fractional drop in conversions RE_k, then divide each channel's removal effect by the sum of all removal effects so attribution shares add to 100%.
MARKETING SCENARIOS
⚙️ Simulation Parameters ▼
Enter a number (e.g. "123") to force the exact same results every time. Useful for classroom demos.
Generating User Journeys...
1. The Raw Data: Customer Journeys
Showing first 15 of pathsBefore building the network, we must look at the raw sequences. Markov cares deeply about the order of these steps (e.g., does Search come before Social?).
2. Visualizing the Flow (Sankey Diagram)
The table above is hard to read. A Sankey Diagram aggregates all those paths into a single "River of Traffic".
The width of the line represents the volume of users moving between steps.
Hover over any grey link to see exactly what % of traffic flows from A to B.
3. The Transition Matrix
The core brain of the Markov model. Probability of moving from Row (Left) to Column (Top).
- Rows = "From" state. Columns = "To" state.
- Example: Find Row "Start" and Column "Search". The number (e.g., 40%) means "40% of users go immediately from Start → Search".
- Rows sum to 100% (everyone has to go somewhere next).
3b. The Ecosystem Map (Network Analysis)
While the Heatmap shows probabilities, this **Network Graph** reveals the "gravity" of your marketing ecosystem. It visualizes the same transition data as a force-directed system.
🧮 Under the Hood: Network Theory (Click to Expand)
This visualization treats your channels as a Force-Directed Graph. Key nodes repel each other, while high-probability transitions act as "springs" pulling them together.
- Node Size \(\propto\) Steady State Probability \(\pi_i\) (long-term traffic share).
- Edge Thickness \(\propto\) Transition Probability \(P(X_{t+1}|X_t)\).
*Mathematically equivalent to the Matrix, but highlights "Ecosystem Clusters".
- 🔵 Nodes (Circles): Represents a Channel.
Bigger Circle = More Traffic passing through. - ➡️ Edges (Lines): Represents a Transition.
Thicker/Darker Line = Higher Probability.
4. The "Removal Effect" Lab
How we calculate attribution: Simulate a "Blackout" of one channel and measure the panic.
🌍 Overview: The "Blackout" Simulation
Before drilling into details, let's look at the big picture. We simulated removing each channel individually and measured the % drop in global conversions.
A high bar means the channel is a Vital Organ (removing it kills conversions).
A low bar means the channel is Redundant (users found another way).
🧪 Deep Dive: Single Channel Removal Lab
Select a channel to simulate a total outage. If the channel is critical (a bridge), conversions will crash.
Final Markov Attribution Results
5. SHAPLEY VS. MARKOV COMPARISON
Same data, different lenses. See how Shapley (presence-based) and Markov (sequence-based) allocate credit differently.
💡 Why Do They Differ?
Asks: "If I add this channel to any mix of other channels, how much does conversion rate improve on average?"
Ignores order. Email as 1st touch = Email as last touch. Credits channels based on their contribution to team performance, regardless of when they played.
Asks: "If I delete this node from the journey network, how much does the global conversion rate drop?"
Order matters. Channels that act as critical bridges (e.g., Social→Email→Conversion) get more credit. Credits channels based on their role in the sequential flow.
- Shapley > Markov: Channel adds value to many mixes but isn't critical to any single path (good "team player")
- Markov > Shapley: Channel is a critical bridge in high-converting paths (structural importance)
- Similar values: Channel is both a good mix partner AND structurally important