Markov Chain Attribution Lab

Advanced Analytics

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.

👨‍🏫 Professor Mode: Guided Learning Experience

New to Markov chain attribution? Enable Professor Mode for step-by-step guidance through building and interpreting your attribution model!

CONCEPT: THE REMOVAL EFFECT

The Problem: Shapley told us who was on the team. But it didn't tell us when they played. Did "Social" start the play, or score the goal?

The Markov Solution: We calculate the probability of moving from StartSearchBuy. Then, we simulate Removing a Node (e.g. Delete "Social"). If the global conversion rate drops by 20%, then Social gets 20% of the credit.

💡 Why This Matters: Real-World Impact

Case Study: A SaaS company discovered via Markov analysis that while "Free Trial" touchpoints appeared in 80% of conversions, they had a low removal effect (only 12% drop). Meanwhile, "Demo Request" appeared in just 30% of paths but had a 45% removal effect—it was the critical bridge.

The Action: They shifted sales focus to fast-tracking engaged users to demos rather than promoting free trials, increasing close rates by 28%.

📘 Technical Explanation: What is a Markov Chain?

A Markov Chain is a mathematical system that transitions from one state to another according to fixed probabilistic rules. It is named after Russian mathematician Andrey Markov.

  • The States: In our context, these are the marketing channels (e.g., Facebook, Email, Display) plus strict start/end states (Start, Conversion, Lost).
  • The Transitions: The arrows connecting the states. The "weight" of an arrow is the probability that a user at State A will go to State B next.
The "Memoryless" Property (Markov Property):
The defining characteristic of a Markov chain is that the probability of the NEXT step depends only on the CURRENT step, not on the history of how you got there.

"It doesn't matter if a user saw 50 ads or 1 ad before arriving at the 'Checkout' page. Once they are at the 'Checkout' state, their probability of buying is fixed based on that state alone."

MARKETING SCENARIOS

Loading scenario details...
⚙️ 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 paths

Before 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?).

Total Sessions
-
Total Conversions
-
Overall Conversion Rate
-

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".

Tip for Reading:
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).

How to read this:
  • 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.

Mathematical Basis:
  • 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".

Visualization Key:
  • 🔵 Nodes (Circles): Represents a Channel.
    Bigger Circle = More Traffic passing through.
  • ➡️ Edges (Lines): Represents a Transition.
    Thicker/Darker Line = Higher Probability.
💡 Insight: Look for "Hubs" (central nodes connected to everything) versus "Islands" (channels disconnected from the main flow).

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.

Interpretation:
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?

Shapley Value (Blue Bars):

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.

Markov Chain (Purple Bars):

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.

🎯 Interpretation Guide:
  • 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