The Mid-Funnel Valuation Problem in Multi-Touch Organic Attribution

Enterprise search engine optimization frequently falters not at the level of indexation or keyword ranking, but at the accounting ledger. While top-of-funnel informational queries capture initial brand awareness and bottom-of-funnel transactional queries capture checkout events, mid-funnel SEO assets—such as comprehensive comparison guides, technical specification breakdowns, teardowns, and category evaluation frameworks—suffer systematic undervaluation. Under first-click models, these assets receive zero credit. Under last-click models, branded navigation and paid retargeting cannibalize their contribution. Even under traditional multi-touch attribution (MTA), these mid-funnel assets are flattened into noise.

To accurately calibrate budget allocations, scale editorial production, and sustainably increase organic revenue, data engineering teams must move beyond heuristic-only or purely stochastic attribution systems. Heuristic models, such as static W-shaped attribution, enforce structural business rules but ignore actual consumer velocity and churn dynamics. Purely algorithmic models, such as first-order Markov chains, measure transition probabilities but discard intentional funnel architecture, frequently over-crediting high-frequency, low-intent landing pages. The solution lies in a unified hybrid framework: fusing discrete-time Markov chain removal effects with deterministic, position-based W-shaped anchoring.

Deconstructing the Component Models

1. The Deterministic W-Shaped Baseline

A standard W-shaped attribution framework assigns fixed percentages to three pivotal business milestones across an individual journey path $P = {t_1, t_2, dots, t_n}$:

  • First Touch ($t_1$): Initial organic discovery event (e.g., non-branded informational query).
  • Lead Creation / Consideration Touch ($t_m$): The mid-funnel transition milestone (e.g., interactive tool interaction, category comparison download, newsletter opt-in, or high-intent comparison table engagement).
  • Opportunity Conversion Touch ($t_n$): The penultimate conversion event immediately preceding conversion or the checkout initiation itself.

Typically, the model distributes 30% of the conversion credit to $t_1$, 30% to $t_m$, and 30% to $t_n$. The remaining 10% is distributed uniformly across the middle touches ($t_k$ where $k notin {1, m, n}$):

$$W(t) = begin{cases} 0.30, & text{if } t in {t_1, t_m, t_n} frac{0.10}{n – 3}, & text{if } t notin {t_1, t_m, t_n} text{ and } n > 3 end{cases}$$

While this configuration prevents middle-touch abandonment, it suffers from severe heuristic bias: it treats all intermediate content assets identically, regardless of whether a mid-funnel page acted as an indispensable conversion catalyst or a redundant detour. For deeper exploration of positional distribution architectures, consult our comprehensive guide on Custom W-Shaped and Position-Based Attribution Weighting for Multi-Session Organic Buyer Journeys.

2. Stochastic Transition: Discrete-Time Markov Chains (DTMC)

Algorithmic attribution treats consumer journeys as a stochastic process governed by states and transition probabilities. Let $S = {s_1, s_2, dots, s_M}$ denote the state space of all SEO content types or URLs, along with two absorbing states: Conversion ($C$) and Null/Drop-off ($N$).

A first-order Markov chain assumes the Markov property: the probability of transitioning to state $s_{j}$ depends solely on the current state $s_{i}$:

$$P(X_{k+1} = s_j mid X_k = s_i, X_{k-1} = s_{i-1}, dots, X_0 = s_0) = P(X_{k+1} = s_j mid X_k = s_i) = p_{ij}$$

We construct the transition matrix $P$ where each element $p_{ij} = frac{C_{ij}}{sum_{k} C_{ik}}$, representing the maximum likelihood estimate of transitioning from state $i$ to state $j$, derived from empirical user journey counts $C_{ij}$.

The total probability of conversion across the entire network, denoted $P(C)$, is computed by summing the probabilities of all valid absorbing paths terminating in $C$.

3. The Removal Effect (RE)

To quantify the marginal utility of a specific mid-funnel asset $s_i$, the Removal Effect systematically eliminates $s_i$ from the state space, redirecting all incoming transitions directly to the absorbing Null state $N$ (or re-normalizing the remaining transitions). Let $P(C mid setminus {s_i})$ represent the conversion probability of the system when node $s_i$ is removed.

The raw Removal Effect ($RE_i$) is defined as:

$$RE_i = 1 – frac{P(C mid setminus {s_i})}{P(C)}$$

Normalizing across all intermediate states yields the algorithmic weight:

$$omega_i^{text{Markov}} = frac{RE_i}{sum_{j=1}^{M} RE_j}$$

The limitation of a standalone Markov model is structural: it evaluates topology without regard to funnel intent. High-volume informational entry pages can display massive removal effects simply due to their position at the root of a funnel graph, while nuanced mid-funnel content that efficiently bridges consideration phases may appear statistically weak if alternative paths exist.

The Hybrid Attribution Architecture

To establish a model that empowers programmatic teams to intelligently optimize and increase organic revenue, we synthesize the deterministic anchor points of the W-shaped baseline with the dynamic, graph-derived weights of the Markov Removal Effect.

Formulating the Hybrid Equation

Let an arbitrary user journey path $P_u$ consist of an ordered sequence of page visits across distinct content taxonomy classifications: $P_u = (x_1, x_2, dots, x_L)$. For each touchpoint $x_k in P_u$, we define two vectors:

  • $vec{W}_{text{static}}(x_k)$: The positional weight determined by the W-shaped framework based on the position $k$ relative to path length $L$ and identifiable intent milestones (First, Mid-Funnel Threshold, Last).
  • $vec{W}_{text{markov}}(x_k)$: The normalized removal effect $omega_{x_k}^{text{Markov}}$ computed across the entire global traversal graph.

We introduce an operational tuning coefficient $alpha in [0, 1]$, which dictates the systemic balance between empirical state drop-off sensitivity and static business milestone prioritization:

$$Phi(x_k) = alpha cdot vec{W}_{text{static}}(x_k) + (1 – alpha) cdot omega_{x_k}^{text{Markov}}$$

Because the sum of $Phi(x_k)$ across the path $P_u$ will rarely equal 1, path-level re-normalization is enforced:

$$widehat{Phi}(x_k mid P_u) = frac{Phi(x_k)}{sum_{j=1}^{L} Phi(x_j)}$$

The total attributed economic value for touchpoint $x_k$ across a transaction yielding revenue $R(P_u)$ is given by:

$$V(x_k) = sum_{u in text{Conversions}} R(P_u) cdot widehat{Phi}(x_k mid P_u)$$

Algorithmic Implementation in Python

The following programmatic script demonstrates how to take multi-session path logs, construct transition matrices, calculate Markov removal effects, and blend them into a custom W-shaped allocation.

import numpy as np
import pandas as pd
from collections import defaultdict

def calculate_markov_removal_effects(paths_df):
    """
    Computes Markov Chain transition matrix and removal effects.
    paths_df expects columns: ['journey_id', 'path_sequence', 'converted']
    path_sequence: List of strings e.g. ['Organic_TOFU', 'Organic_MOFU_Compare', 'Conversion']
    """
    transitions = defaultdict(int)
    state_counts = defaultdict(int)
    
    for _, row in paths_df.iterrows():
        path = row['path_sequence']
        for i in range(len(path) - 1):
            s_curr, s_next = path[i], path[i+1]
            transitions[(s_curr, s_next)] += 1
            state_counts[s_curr] += 1

    states = sorted(list(set([k[0] for k in transitions.keys()] + [k[1] for k in transitions.keys()])))
    base_matrix = pd.DataFrame(0.0, index=states, columns=states)
    
    for (s_curr, s_next), count in transitions.items():
        base_matrix.loc[s_curr, s_next] = count / state_counts[s_curr]
        
    def run_simulation(matrix):
        # Fundamental matrix calculation for absorbing Markov chain
        transient_states = [s for s in matrix.index if s not in ['Conversion', 'Null']]
        if 'Conversion' not in matrix.columns:
            return 0.0
        
        Q = matrix.loc[transient_states, transient_states].values
        R = matrix.loc[transient_states, ['Conversion']].values
        
        I = np.identity(len(transient_states))
        try:
            # Fundamental Matrix N = (I - Q)^(-1)
            N = np.linalg.inv(I - Q)
            B = np.dot(N, R)
            # Conversion rate starting from initial state
            return np.mean(B)
        except np.linalg.LinAlgError:
            return 0.0

    base_cvr = run_simulation(base_matrix)
    removal_effects = {}
    transient = [s for s in states if s not in ['Conversion', 'Null']]
    
    for s in transient:
        temp_matrix = base_matrix.copy()
        # Nullify transitions through state s
        temp_matrix.loc[s, :] = 0.0
        temp_matrix.loc[s, 'Null'] = 1.0
        
        cvr_without_s = run_simulation(temp_matrix)
        re = 1.0 - (cvr_without_s / base_cvr if base_cvr > 0 else 0)
        removal_effects[s] = max(re, 0.0)
        
    total_re = sum(removal_effects.values())
    markov_weights = {k: v / total_re for k, v in removal_effects.items()} if total_re > 0 else {}
    return markov_weights

def apply_hybrid_attribution(path, markov_weights, alpha=0.5):
    """
    Combines static W-shaped weights with Markov removal weights.
    path: List of intermediate touchpoint strings (excluding Conversion/Null)
    """
    L = len(path)
    if L == 0:
        return {}
    if L == 1:
        return {path[0]: 1.0}
    
    # 1. Compute Static W-Shaped Weights
    static_weights = np.zeros(L)
    if L == 2:
        static_weights[0] = 0.50
        static_weights[1] = 0.50
    else:
        static_weights[0] = 0.30   # First touch
        static_weights[-1] = 0.30  # Last touch
        
        # Mid-funnel milestone identification (center-most index)
        mid_idx = L // 2
        static_weights[mid_idx] = 0.30
        
        # Distribute remaining 10%
        rem_indices = [idx for idx in range(L) if idx not in [0, mid_idx, L - 1]]
        if rem_indices:
            dist_weight = 0.10 / len(rem_indices)
            for idx in rem_indices:
                static_weights[idx] = dist_weight
        else:
            # Rebalance if length is exactly 3
            static_weights[0] = 0.333
            static_weights[mid_idx] = 0.334
            static_weights[-1] = 0.333

    # 2. Extract Markov Weights
    mk_weights = np.array([markov_weights.get(touch, 0.0) for touch in path])
    if np.sum(mk_weights) > 0:
        mk_weights = mk_weights / np.sum(mk_weights)
    else:
        mk_weights = np.full(L, 1.0 / L)

    # 3. Hybridize and Normalize
    blended = alpha * static_weights + (1.0 - alpha) * mk_weights
    normalized_blended = blended / np.sum(blended)
    
    return {touch: normalized_blended[idx] for idx, touch in enumerate(path)}

Mid-Funnel Valuation Dynamics: Comparative Matrix

To demonstrate how this hybrid engine corrects misallocated credit, consider three archetypal touchpoints across a multi-session organic cohort. The table below illustrates the redistribution of attributed credit across differing methodologies:

Content Archetype & Function Pure Heuristic (Last-Click) Pure Static (W-Shaped) Pure Algorithmic (1st-Order Markov) Hybrid Formulation ($alpha = 0.5$)
TOFU: Complete Guide to SaaS Integration Architecture 0.00 0.30 0.45 0.375
MOFU: Platform A vs Platform B vs Enterprise Custom Build 0.00 0.30 0.42 0.360
BOFU: Enterprise Pricing & SLA Calculator 1.00 0.30 0.13 0.215
Auxiliary Mid-Funnel: API Documentation Reference 0.00 0.10 0.00 0.050

Under pure last-click, MOFU assets generate zero attributed returns, signaling to marketing leaders that educational comparison content fails to generate ROI. Under standard W-shaped models, the MOFU comparison guide is awarded a baseline 30%, but fails to capture that its removal drops total system conversion probability by 42%. The hybrid framework harmonizes this dynamic: it preserves the foundational intent milestones while heavily prioritizing mid-funnel content that possesses real, mathematical removal leverage.

Mitigating Edge Cases and Higher-Order State Spaces

When implementing this hybrid methodology within real-world digital ecosystems, three distinct technical failure modes must be accounted for:

1. Higher-Order Memory and State Explosion

The standard Markov model assumes the zero-memory condition. However, buyer journeys through enterprise documentation and commercial comparisons often exhibit high lag and historical pathing dependencies. Implementing a second-order or third-order Markov chain captures sequence history (e.g., $P(s_k mid s_{k-1}, s_{k-2})$), but causes the state space matrix to scale quadratically:

$$|S_{text{order } k}| = |S|^k$$

To avoid matrix sparsity and computational bottlenecking, implement canonical state bucketing. Rather than tracking millions of individual page URLs, map assets to structured analytical vectors: intent_tier:sub_vertical:content_format (e.g., MOFU:DevOps:FeatureMatrix).

2. The Ping-Pong Loop Dilemma

Users frequently oscillate between comparative landing pages and technical specifications within the same session. In an uncorrected Markov transition matrix, these loops create artificial absorbing clusters that exaggerate the Removal Effect of secondary navigation hubs. To mitigate this:

  • Apply path deduplication: Collapse consecutive duplicate states ($s_i to s_i to s_i$) into a single state visitation event ($s_i$).
  • Sessionize intra-visit loops using time-decay damping: Restrict weight calculation to unique state changes occurring outside a 30-minute operational window.

3. Matrix Ergodicity and Sink States

In web-log analytics, certain internal links lead to orphaned technical guides or non-converting leaves. These transient dead-ends act as accidental sinks. Data pipelines must run an ergodicity check on the directed graph prior to calculating removal effects. If a non-conversion state has zero exit probability, its outbound transition probability must be structurally distributed back to the baseline Null state $N$. This guarantees that the fundamental matrix $(I – Q)^{-1}$ remains non-singular, maintaining absolute numeric stability during production runs.

By blending the deterministic scaffolding of customized position metrics with rigorous stochastic removal modeling, data teams elevate mid-funnel content valuation from crude conjecture to an exact engineering discipline—unlocking precise budget allocation to directly increase organic revenue.

Related Guides in This Series