The Long Run
← Back to blog

Data Science

Markov vs Rule-Based Attribution: How It Fixes the Gaps

Part 6: Compare Markov attribution vs 5 rule-based models credit to the same 50,000 journeys. Which gaps in last click and first touch it closes, and which remain?

·12 min read
Covered so far
  • Part 5: Built customerjourneys as a Markov chain, with removal effects and credit shares
In this part
  • How five rule-based models and Markov credit the same 50,000 journeys
  • Which gaps in rule-based attribution Markov closes, and which it only narrows
  • When a holdout test is still needed on a MTA data
  • Marry Markov results to a budget review

In Part 5 we turned Kesari Threads' customer journeys into a Markov chain and measured each channel's removal effect. This part puts that result next to the rule-based models from the Marketing Channel Attribution series, all run on the same journeys, and checks which of their known gaps Markov closes and which it leaves open.

Gaps in Rule Based Attribution models

Part 3 of the attribution series listed four blind spots shared by every rule-based model:

GapWhat it does to the budget report
1. The credit rule is fixed in advanceThe choice of model decides which team looks good, regardless of channel performance
2. Single-touch rules credit one touch per journeyMost touchpoints earn nothing at all
3. Only converting journeys are countedA channel that loses most of its visitors can look as good as one that keeps them
4. It can't tell which sales would have happened anywayA channel that reaches people who had already decided to buy, such as an ad on a search for "Kesari Threads", gets credit for sales it did not create

Table 1: The four gaps in rule-based attribution, from Part 3 of the attribution series.

The sections below take them one at a time, using the 50,000 simulated Kesari journeys from Part 5 which has 3,206 conversions and 46,794 null paths going over six channels.

Markov vs Rule Based Attribution Comparison

The below figure 1 credits the 3,206 conversions to the six channels under five rule-based models and the Markov model.

Time decay is left out because these simulated journeys carry no dates.

Figure 1: Share of Kesari's 3,206 conversions credited to each channel under six models.

Each row is a channel and each column is a model. Every column adds up to 100%, and darker cells mean more credit. The Markov column, outlined in green, is each channel's removal effect scaled to 100%.

The single-touch columns disagree sharply. First touch makes Instagram Ads and Google Shopping the stars, while last click and LNDC hand the win to Brand Search and Direct.

Linear, position-based and Markov sit much closer together: no channel differs by more than 6 percentage points across those three columns. Markov also spreads credit across the whole journey. No channel gets more than 22.0%, and the smallest share, Influencer's, is still 5.9%.

Gap 1: The rule is chosen in advance

Every rule-based model starts with a decision made before anyone looks at the data: 100% to the last click, 40/20/40 for position-based, an equal split for linear. The choice of rule then shapes the report. In Figure 1, Brand Search gets anywhere from 9.4% to 40.5% of the credit depending only on which column you read.

The Markov model has no credit rule to choose. Its weights come from the transition counts. If customers who reach Google Shopping goes straight to Null more often, its row in the TPM changes, its removal effect falls, and its credit falls with it. Under a fixed rule like position-based, Google Shopping gets the same fixed share every time it opens or closes a journey, however well its visitors convert.

📌 Key idea: With a rule-based model, changing the model changes the answer. With Markov, only changing the data does.

Gap 2: Single-touch rules ignore most of the journey

Kesari's 3,206 converting journeys contain 8,046 touchpoints. Last click credits exactly one per journey, so 60.2% (3206 of 8046)of those touchpoints earn nothing. First touch has the same problem like last click.

Figure 2 shows where each channel lands under the two single-touch rules, linear, and Markov.

Figure 2: Markov credit compared with first touch, last click and linear for each channel.

The horizontal axis is the share of conversions credited. Blue dots are first touch, orange dots are last click, and the grey bar between them is the range the two single-touch rules disagree over. For every channel, the green Markov diamond falls inside that range.

The biggest swing is Instagram Ads. It opens 34.2% of converting journeys but is the final touch in only 2.1%. A team judged on last click would see Instagram as nearly worthless and cut its budget. Markov gives it 18.1%, because switching it off removes 39.5% of conversions: many routes to Google Shopping, Email and Brand Search start with an Instagram ad.

Brand Search moves the other way. LNDC gives it 40.5% because customers often search for "Kesari Threads" just before buying. Markov gives it 20.2%. It still scores well, since 44.1% of conversions pass through it, but it no longer takes credit for the steps that brought the customer to that search.

Gap 3: Only converting journeys are counted

Every rule-based model shares out sales i.e. converting journeys, so it never looks at the 46,794 journeys that was without a conversion. Markov builds its TPM from both kinds, which gives it information the rules never see. Figure 3 shows how often each channel appears in conversion paths and in null paths.

Figure 3: How often each channel appears in conversion paths and null paths, with the chance of converting from it.

Green bars show the share of conversion paths that include the channel at least once, and grey bars show the same for null paths. The figure under each channel is its conversion probability from Part 5.

Influencer is the clearest case. It appears in 28.7% of null paths but only 13.2% of conversion paths, and only 3.0% of customers who arrive from an Influencer post go on to buy. First touch, which looks only at the sales, gives Influencer 11.9% of the credit because it often opens the journeys that do convert. Markov gives it 5.9%. Its removal effect is just 12.9%, because so few converting routes pass through it.

Brand Search shows the opposite pattern: in 43.8% of conversion paths but only 21.8% of null paths, with a 12.2% conversion probability. Customers who reach it are well on their way to buying.

⚠️ Pitfall: Null paths do not penalise a channel just for appearing in lost journeys. Instagram Ads is in 40.3% of conversion paths and 41.2% of null paths, and its visitors convert at 6.2%, slightly below average. Markov still gives it 18.1% of the credit, because the removal effect counts the converting routes that run through a channel. Use the conversion probability from each touchpoint alongside the credit to see which channels lose customers.

Gap 4: What would have happened anyway

Some sales would happen whether or not a channel was there. Picture a customer who saw a friend's Kesari kurta and has already decided to buy one. They search "Kesari Threads", click the brand search ad at the top of the results and place an order. If the ad had not been there, they would have clicked the free search result just below it. The ad was on the route, but it did not create the sale.

Last click gives that ad full credit. Markov does better than any rule-based model here, because its removal effect asks a what-if question: how many conversions would be lost without this channel? Part 5's interactive chart answered it for Kesari: switching off Google Shopping takes conversions from 3,206 to about 1,667. No rule-based model can produce that number, because none of them has a model of how customers move.

The what-if still rests on an assumption. When a channel is removed, the model sends everyone who would have reached it to Null and treats them as lost. Real customers often find another way in: the brand searcher above would click the free result or type the address. So for channels that are easy to replace, the removal effect overstates the loss. Markov sees Brand Search on 43.8% of converting routes and gives it 20.2% of the credit, but it cannot tell how many of those buyers would have arrived anyway. This is the gap the attribution series warned about, and Markov narrows it without closing it.

When is a holdout test needed?

The only way to measure what would have happened anyway is to change something and compare. A holdout test pauses a channel for some customers or regions and compares their sales with a matched group where the channel kept running. It is worth the effort:

  • before cutting or sharply raising a channel's budget
  • for channels that mostly reach people who already know the brand, such as brand search, retargeting and email to past buyers
  • when last click and Markov disagree strongly and a lot of money depends on which is right

Here is how it could work for Kesari's Brand Search, which gets 1,156 conversions under last click and 647 under Markov. Kesari picks 12 cities with similar past sales and pauses its brand search ads in 4 of them for six weeks. The other 8 keep the ads running.

Suppose orders in the 4 paused cities come out only slightly below the matched cities, while clicks on Kesari's free search listing rise. That would mean most brand-search buyers found the site anyway, and the ads created far fewer sales than either model credits them with. Kesari could then lower its brand search bids and keep ads running only where competitors bid on its name. This result is an illustration of how to read a holdout test, not an output of the simulated dataset.

If orders in the paused cities fell sharply instead, Brand Search would be doing real work and its Markov credit would stand. Either way, Markov helps decide which channel to test first.

What changes in a budget review

Percentages are easier to compare, but budget meetings usually talk in conversions. Multiplying each share by Kesari's 3,206 conversions gives the number each team would report:

ChannelLast clickMarkovChange
Instagram Ads67579+512
Influencer24189+165
Google Shopping347704+357
Email549516−33
Brand Search1,156647−509
Direct1,063571−492
Total3,2063,2060

Table 2: Conversions credited to each channel under last click and under Markov.

The total mentioned above remains the same, it is that Markov attribution model moves about 1,000 conversions from the channels that close journeys i.e. from Brand Search and Direct, to the channels that open the journey i.e. mainly to Instagram Ads and Google Shopping. Email barely moves, from 549 to 516.

What each change suggests

Table 3 reads each row of Table 2 alongside the other results in this part and suggests a next step.

ChannelChangeWhat it suggestsNext step
Instagram Ads+512Opens many converting journeys that last click hidA candidate for more budget. Test before a big move
Influencer+165More credit, but only 3.0% of its visitors go on to buyKeep spend steady and watch its conversion probability
Google Shopping+357The largest removal effect, 48.0%Protect its budget
Email−33About the same under both modelsNo change
Brand Search−509Much of its last-click credit was for closing journeys other channels started, and some of its buyers would have come anywayRun a holdout test before cutting, as in Gap 4
Direct−492Not a paid channelNo budget line. Report it separately

Table 3: What the move from last click to Markov suggests for each channel.

Running the first Markov budget review

  1. Show both columns side by side for two to three months. A team that has reported on last click for years will see its search numbers fall in the first Markov report. Seeing both makes it clear that the drop comes from the change in method: the customers and the sales are the same.
  2. Add each channel's conversion probability. Credit shows how much a channel contributes to sales. The conversion probability shows how many of its visitors go on to buy.
  3. Move budget in small steps. Shift part of a channel's budget, watch total sales, then decide whether to move more.
  4. Test before big cuts. Run a holdout test for any channel whose budget would fall sharply, starting with Brand Search.
  5. Rebuild the model every month. Refit it on a recent window of journeys, so the credit reflects how customers behave now.

Rule-based vs Markov at a glance

Rule-based modelsMarkov chain model
How credit is decidedA fixed rule chosen by the analystLearned from transition counts in the journeys
Journeys usedConverting journeys onlyConverting and null journeys
Touchpoints creditedOne (first touch, last click, LNDC) or all by a fixed formula (linear, position-based)Every channel on a converting route, weighted by its removal effect
Repeated visitsLinear and position-based give a share to each visitThe removal effect asks only whether a channel is on the route
Extra outputsNoneConversion probability from each touchpoint, conversions lost if a channel is switched off
Data neededWorks from a handful of conversionsNeeds thousands of journeys for stable probabilities
Easy to explainYes, in one sentenceTakes a diagram and an example
Measures what would have happened anywayNoNo, but it gives a model-based what-if

Table 4: How rule-based models and the Markov model compare.

When not to use Markov attribution

  • Few journeys. With a small store or a short window, many transitions are seen only a handful of times, and removal effects swing from one month to the next. Linear is a steadier choice until the data grows.
  • Broken journeys. If consent banners, cross-device browsing or app-to-web hops split one customer into several visitors, many journeys look shorter than they are and many look like null paths. Fix tracking first.
  • Channels you cannot track. TV, print, podcasts and word of mouth leave no touchpoint, so Markov hands their effect to whatever channel the customer used next, usually Direct or Brand Search. Marketing mix modelling covers them better.
  • Questions about cause. If the decision is "will sales fall if we cut this budget?", run a holdout test. Markov can suggest which channel to test.

Key Takeaways

  • On the same 50,000 journeys, the single-touch rules disagree wildly: Instagram Ads gets 34.2% under first touch and 2.1% under last click. Markov gives it 18.1%.
  • Markov closes Gap 1 by learning its weights from the data, and Gap 2 by crediting every channel on a converting route. For Kesari, 60.2% of touchpoints earn nothing under last click.
  • It uses null paths (Gap 3) to give each touchpoint a conversion probability. Influencer converts 3.0% of its visitors and Brand Search 12.2%.
  • Linear and position-based land close to Markov here, within 6 percentage points for every channel. Markov's advantage is that its weights come from the data and that it can answer what-if questions.
  • Markov narrows Gap 4 without closing it. It cannot see what customers would have done anyway, so holdout tests remain the way to confirm a channel's value.

➡️ Up next: the next parts cover building customer journeys from raw data with a lookback window, and keeping the model up to date. They'll appear on the series page when published.

Quick Quiz: Test Yourself

🧠 Test yourself: 5 questions (click to open)

1. Why does Instagram Ads get 2.1% of the credit under last click but 18.1% under Markov?

2. Which rule-based gap does the Markov model close by using null paths?

3. Instagram Ads appears in 40.3% of conversion paths and 41.2% of null paths. What does the Markov model do with that?

4. Why can't the Markov model tell whether a Brand Search customer would have bought anyway?

5. Kesari's tracking misses podcast listening entirely. What happens to that effect in the Markov model?

0 of 5 answered

Unsure about a term? See the Markov Chain Attribution Jargon Checklist.

In case of any queries or feedback, feel free to drop a comment or reach out using the Contact section.

Comments