Data Science And Analytics For Operations
November 19, 2026
Multi-touch Attribution in E-commerce: A Comparison between Markov Chains and Last-Click
Victor Hugo Garcia de Alcantara; Lucas Zanovello Tahara
DOI: 10.22167/2675-6528-202603808
Article derived from a Final Course Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
The research investigated Multi-touch Attribution Models (MTA) in e-commerce, seeking to overcome the limitations of the Last-Click model, widely used in the market. The objective was to compare the performance of first-order Markov Chains with Last-Click and Position-Based approaches, identifying the value of assistance channels frequently ignored. To this end, Markov Chain algorithms were applied to a large volume of purchase journey data from the Google Merchandise Store, extracted via BigQuery. The study probabilistically mapped the purchase journey and calculated the Removal Effect to quantify channel relevance. The results demonstrated that data-driven models identified the strategic role of discovery (awareness) and assistance channels, which Last-Click neglected in 65% of complex journeys. Simulated financial analysis indicated an approximate 28% hidden efficiency in Cost Per Acquisition (CPA) for Paid Search, compared to the Last-Click model. It was concluded that Markov Chains allowed for a more accurate mapping of purchase journeys, validating the technical feasibility of the modeling and providing evidence for more efficient budget allocation in digital media, mitigating the risk of early divestment in crucial channels.
Keywords: Assistance channels; Data Science; E-commerce; Digital marketing; Media optimization.
1. Introduction
The consumer journey in the contemporary digital ecosystem is characterized by high fragmentation and multiplicity of touchpoints. Before completing a commercial transaction on e-commerce platforms, users interact non-linearly with various digital marketing channels, such as social media, paid search, display campaigns, email marketing, and direct access (KAKALEJCÍK et al., 2019). This multifaceted dynamic requires a deep understanding of how each interaction contributes to the final conversion.
Despite this complexity, performance measurement and revenue attribution in most organizations are still predominantly based on the last-click model, or Last-Click. This conventional heuristic approach assigns the entirety of the conversion credit to the user’s last chronological interaction, systematically disregarding the history of previous touchpoints and the persuasive efforts that sustained the journey (KAKALEJCÍK et al., 2019).
This methodological simplification leads to a critical undervaluation of channels focused on brand awareness and consideration, resulting in distortions in capital allocation and inefficient digital media investment decisions. The central problem lies in the structural inability of traditional models based on heuristic rules to capture the interdependence and causal nexus between different media. According to Molnar (2022), these fixed models are static and deterministic, unable to adapt to the empirical variability of user navigation records.
Digital marketing literature subdivides attribution modeling methodologies into approaches based on predefined rules (heuristics) and data-driven models. Among the single-touch heuristic alternatives, besides Last-Click, the First-Click model stands out, transferring the entirety of economic merit to the point of introduction. To mitigate the rigidity of single-touch models, fractional multi-touch heuristics emerged, such as the Linear and Position-Based models.
The Linear model distributes revenue credit uniformly and identically among all touchpoints, assuming a theoretical premise of equivalent impact that is rarely confirmed. The Position-Based arrangement, in turn, weighs the journey asymmetrically, assigning forty percent of the credit to the first touch, forty percent to the last, and distributing the remaining twenty percent equally among the intermediate channels (KAKALEJCÍK et al., 2019). Although these solutions acknowledge the multiplicity of stimuli, their weighting criteria remain arbitrary, subjective, and static, failing to reflect the dynamic behavior extracted from raw conversion data.
Given the limitations of fixed heuristics, data-driven algorithmic modeling is consolidated in the scientific literature as a rigorous and mathematically neutral probabilistic alternative. In this category, Markov Chains applied to the marketing scenario stand out for their ability to interpret interaction history as a stochastic state transition process. From this perspective, marketing channels assume the role of nodes in a probabilistic network, where the advancement to the next channel, the abandonment of navigation, or the final conversion of the user are mathematically measured based on the observed frequency of movement between states (LEVIN et al., 2017).
The great operational innovation introduced by Markov Chains lies in the mathematical formulation of the removal effect, or Removal Effect. This index quantifies the structural relevance and network centrality of each media channel by simulating the impact of its hypothetical and total exclusion from the channel mix on the overall conversion probability of the studied ecosystem (ANDERSON; CHENG, 2020). This probabilistically unbiased mechanism enables the identification of hidden efficiencies in top-of-funnel media, whose strategic assistance impacts are customarily ignored by conventional digital market reporting tools.
The analysis of real e-commerce data revealed that the purchase journey is predominantly multichannel. It was observed that only thirty-five percent of conversions occurred with a single touch, indicating that the Last-Click model ignored the complete journey in sixty-five percent of successful cases. Consumer behavior demonstrated high dependence on multiple stimuli, with many conversions requiring two, three, or more touchpoints, extending into a “long tail” of interactions. Maintaining a Last-Click-based strategy in this scenario means making budget decisions that ignore the real complexity of the consumer journey.
In this scenario of seeking greater analytical precision and maturity in budget allocation, the implementation of data-driven multi-touch attribution models emerges as a strategic necessity to analytically reallocate credit and overcome the limitations of heuristic models. Thus, the present study sought to compare the predictive and distributive performance of the traditional last-click model against multi-touch approaches, considering the position-based heuristic and first-order Markov Chain probabilistic modeling.
2. Material and Methods
The research adopted a quantitative and applied approach, structured from the data pipeline of a real e-commerce operation. The study sought to compare the predictive and distributive performance of the traditional last-click model against multi-touch approaches, contemplating position-based heuristics and first-order Markov Chain probabilistic modeling.
The methodological procedure was divided into four macro stages: (i) extraction and cleaning of raw navigation journey data; (ii) modeling of Last-Click and Position-Based heuristics; (iii) development of the first-order Markov Chain probabilistic model and calculation of the Removal Effect; and (iv) application of cost reverse engineering for comparative analysis of budgetary efficiency.
The unit of analysis consisted of anonymized navigation and conversion data from the Google Merchandise Store platform, extracted from the public dataset `google_analytics_sample` via Google BigQuery. The analyzed period comprised twelve months, from August 2016 to August 2017, aiming for statistical robustness and the capture of seasonalities.
For the definition of the analytical scope of the journeys, a lookback window, or attribution temporal cut-off, was adopted, fixed at thirty days. This parameterization was selected to align with the average consideration and purchase decision cycle of the e-commerce studied, allowing the capture of initial discovery touchpoints without inflating computational complexity.
The data preparation followed fundamental guidelines. Original contact points were consolidated into standardized macrocategories (Paid Search, Direct, Organic, and Social) based on traffic sources and UTM parameters. Records generated by automated accesses or interactions on technical error pages were disregarded. Redundant and consecutive interactions from the same channel were consolidated.
The navigation paths were reconstructed chronologically from the unique user identifier (`fullVisitorId`), ordered by timestamp and delimited by the journey’s outcome, generating the exact sequences for the application of attribution algorithms.
First-order Markov Chain probabilistic modeling was implemented using the `ChannelAttribution` library in the Google Colab environment. The value of each channel was determined by the “Removal Effect”, which quantifies the drop in the probability of total conversion if a specific channel is removed from the channel mix (LEVIN et al., 2009).
To strengthen the comparative analysis, the position-based (`Position-Based` or `U-Shaped`) model was included as a baseline heuristic. This model assigns forty percent of the conversion value to the first touchpoint, forty percent to the last, and distributes the remaining twenty percent equally among intermediate interactions.
A financial sensitivity analysis was performed based on the construction of three distributive analytical scenarios: Conservative, Base, and Optimistic, focused on the Paid Search channel. This approach aimed to transform quantitative simulation into a strategic media decision support instrument, considering market fluctuations in Cost Per Click (CPC) and channel analytical efficiency.
Cost engineering started from the identification of 1,529 unique clicks attributed to Paid Search. From this fixed volume, the premises of CPC and conversion rates were parametrically varied to evaluate the behavior of cost per sale in different operational contexts. The navigation and conversion data used were anonymized.
It is important to emphasize that the database used for the Markov Chains algorithm strictly contemplated journeys that culminated in effective conversion. Operational limitations in the volume of extraction from the public dataset delimited the analytical scope to successful paths. Consequently, the generated transition matrices reflected probabilities conditioned on a positive outcome.
3. Results and Discussion
The research results revealed crucial insights into the dynamics of the e-commerce customer journey and the effectiveness of multi-touch attribution models compared to heuristic approaches. The database used, from the Google Analytics Sample dataset of the Google Merchandise Store, totaled 903,653 sessions and 714,167 unique users. During the analyzed period, 11,515 converted transactions were recorded, resulting in an average conversion rate per user of 1.27%. Data extraction and cleaning via BigQuery were fundamental to ensure the necessary critical mass, conferring statistical relevance to Markov Chain modeling in weight distribution and the calculation of the Removal Effect.
Descriptive Analysis and Data Volumetry
The descriptive analysis of the data demonstrated that the purchase journey in the studied e-commerce was predominantly multichannel, challenging the premise of simplified attribution models. When examining the volume of conversions in relation to the quantity of interactions, it was found that only 35% of conversions, corresponding to 3,313 out of a total of 9,494 conversions analyzed in this specific sample, occurred with a single touchpoint. This finding is a critical indicator that the Last-Click attribution model, widely adopted in the market, neglected the complete journey in 65% of successful cases, disregarding the real complexity of consumer behavior.
Complexity of the Journey and Justification of Modeling
Consumer behavior revealed a high dependence on multiple stimuli, with 2,349 conversions requiring two contacts and 1,512 demanding three interactions. Journeys extended into a “long tail,” reaching up to ten touchpoints before the final conversion. Maintaining a budget allocation strategy based exclusively on the Last-Click model in this scenario would imply making investment decisions that ignore the inherent complexity of the consumer journey. The implementation of Markov Chains, therefore, emerged as a strategic necessity to analytically and more accurately reallocate credit to marketing channels.
To deepen the understanding of multichannel behavior, the exact sequences of media that make up successful journeys were mapped. The analytical scope was limited to journeys considered complex, characterized by multiple touchpoints and the absence of redundant or consecutive interactions from the same channel. Among the most frequent sequences, the “Direct > Organic Search” path stood out, concentrating 56.45% of the representativeness of complex journeys. This flow indicates that a significant portion of users intentionally search for the brand but validate their purchase intention through search engines at a later stage, reinforcing the importance of consistent investments in search engine optimization (SEO) to ensure assisted conversions.
Additionally, Paid Search demonstrated to act prominently in both the introduction and the middle of complex journeys, depending on other channels for cycle completion. In managerial terms, this configuration of paths highlights that measurement based exclusively on the last-click heuristic rule omitted the real economic contribution of these initial capture ads. If marketing governance were to evaluate Paid Search solely by the volume of direct closings, it would incur the strategic risk of reducing investments in media that, as illustrated by the journey ranking, act as fundamental links for feeding and sustaining organic conversion flows.
Modeling Comparison: Last-click vs MTA (Markov and Position Based)
The comparison between the Last-Click model, the Position-Based heuristic, and probabilistic modeling using Markov Chains evidenced a fundamental redistribution of credit, essential for a more accurate understanding of the consumer journey. While Last-Click neglected the initial touchpoints and Position-Based rigidly and predefinedly distributed the weight (40% to the first, 40% to the last, and 20% to intermediate ones), the data-driven model (Markov) allowed for dynamic and statistical identification of which channels truly acted as prospecting origins, even if they were not at the closing of the conversion journey.
It was observed that awareness and consideration channels were the biggest beneficiaries of the shift to multi-touch models. Organic Search, for example, showed a significant absolute gain of 161 credit units in the Markov model compared to Last-Click, increasing from 1,047 to 1,208. This behavior was approximately mirrored by the Position-Based model, which assigned 1,109 units, due to the valuation of the first touch. This indicated that SEO and brand content are fundamental for the user’s discovery phase, highlighting their role as journey initiators.
Similarly, Paid Search, which in the Last-Click model received 111 credit units, had its contribution re-evaluated to 155 units in the Markov model, a gain of 44 units. The Position-Based model assigned 117 units. This re-evaluation demonstrated that Paid Search was underestimated by the traditional model, and both the Position-Based and Markov models revealed that its real contribution as a journey initiator was significantly higher. The Display channel also showed a gain of 9 units, increasing from 61 to 70 in the Markov model, indicating its role in prospecting.
In contrast, the Direct channel suffered the greatest credit retraction when exiting the last-click model, with a loss of 207 units, going from 4,679 to 4,472 in the Markov model. This result suggested that direct access functioned mostly as a final convenience point and not as the primary demand generator. It was noted that the Position-Based model still retained a high volume of credit for Direct, assigning 4,359 units, by fixing 40% of the credit to the last touch, while the Markov model, through the Removal Effect, managed to isolate the real impact of the channel without artificially overvaluing it. Without this comparative view, management would run the strategic risk of overestimating direct traffic and unbalancing investment distribution in the media mix.
Financial sensitivity analysis and decision scenarios
To mitigate the limitations associated with the use of static cost assumptions and extend the practical utility of probabilistic modeling, a financial sensitivity analysis was performed. This analysis was based on the construction of three distributive analytical scenarios (Conservative, Base, and Optimistic) on the Paid Search channel, aiming to transform quantitative simulation into a strategic tool for media decision support, considering market fluctuations in Cost Per Click (CPC) and the channel’s respective analytical efficiency.
Reverse engineering started with the identification of 1,529 unique clicks attributed to Paid Search in the dataset. From this fixed volume, CPC assumptions and conversion rates were parametrically varied to evaluate the behavior of cost per sale in different operational contexts. In the Conservative Scenario, with an average CPC of R$ 3.50, the total investment calculated was R$ 5,351. In the Base Scenario, with a CPC of R$ 2.50, the investment was R$ 3,822. In the Optimistic Scenario, with a CPC of R$ 1.80, the investment was R$ 2,752.
The projection of Cost per Acquisition (CPA) by model demonstrated that, regardless of market fluctuation in external cost parameters, probabilistic modeling by Markov Chains consistently maintained the identification of a hidden efficiency of approximately 28% compared to the traditional last-click model. In the Conservative Scenario, for example, the Last-Click model would indicate a CPA of R$ 47.78, while the Markov Chains model projected a CPA of R$ 34.43. This difference of 27.94% represents an optimized hidden efficiency.
This variation demonstrates that the Markov Chain algorithm reduces the risk of early divestment in essential assistance channels, conferring greater tactical resilience to budget planning under adverse market conditions. Hidden efficiency remained around 28% across all scenarios (27.94% in Conservative, 27.95% in Base, and 27.92% in Optimistic), validating the robustness of the data-driven approach in identifying marginalized value.
To consolidate the application of this simulation as a media governance tool, a theoretical model of efficient budgetary reallocation was structured. Taking as reference the importance contraction suffered by the Direct channel, which was isolated from the final touch bias, a 20% reduction in the capital allocated to this convenience front was simulated. This amount was distributed proportionally among the channels that presented real assistance gain and high Removal Effect, such as Organic Search (SEO), Paid Search, and display campaigns (Display).
The expected managerial impacts of this strategic redistribution include the mitigation of capital waste on users already loyal to the Direct channel, contributing to the stabilization of the Overall CPA. For Paid Search, a 10% budget increase projected the expansion of qualified mid-funnel demand capture and the reduction of Assisted CPA. Organic Search, with a 7% increase, aimed at strengthening domain authority and attracting perennial traffic, with the growth of Organic ROAS as the main indicator. Display, with a 3% increase, sought to stimulate brand discovery and feed the top of the funnel, increasing the Conversion Rate.
Decision-making supported in these scenarios modifies the dynamics of monitoring Return on Investment (ROI) and Return on Ad Spend (ROAS). By reallocating funds from a closing channel (Direct) and distributing them in a way oriented towards prospecting and assistance channels, a reduction in the overall cost per acquisition of the operation is projected. This redirection of resources based on the probabilistic model ensures that the budget is directed to media with a proven high Removal Effect, favoring an increase in the total volume of transactions and correcting distortions caused by single-touch models.
In summary, the results demonstrated that Markov Chains allowed for a more precise mapping of purchase journeys, overcoming the limitations of heuristic models such as Last-Click and Position-Based. The analysis validated the technical feasibility of the modeling and provided evidence for a more efficient budget allocation in digital media, identifying the strategic role of discovery and assistance channels that were previously neglected. However, it is important to note that the database used strictly included journeys that culminated in effective conversion, which constitutes a methodological limitation in the interpretation of credit redistribution. Furthermore, the results are specific to the public dataset of the Google Merchandise Store, the costs were simulated, and the 30-day lookback window may have omitted longer journeys, and the way channels are grouped may influence the results.
4. Conclusion
This study sought to compare the performance of the traditional Last-Click model with multi-touch approaches, including the Position-Based heuristic and first-order Markov Chain probabilistic modeling, in the context of e-commerce. It was found that the purchase journey was predominantly multi-channel, with sixty-five percent of complex conversions being neglected by the Last-Click model. Markov Chains allowed for the identification of the strategic role of discovery and assistance channels, such as Organic Search and Paid Search, which were underestimated by heuristic approaches. The simulated financial analysis demonstrated a hidden efficiency of approximately twenty-eight percent in Cost Per Acquisition (CPA) for Paid Search, compared to the Last-Click model. This approach offered a more accurate mapping of purchase journeys, validating the technical feasibility of the modeling and providing evidence for a more efficient budget allocation in digital media, mitigating the risk of early divestment in crucial channels.
However, the study presented some limitations. The database used strictly included journeys that culminated in effective conversion, which restricts the interpretation of credit redistribution. The results are specific to the Google Merchandise Store public dataset, and the costs were simulated, not reflecting real market variations. The thirty-day lookback window may have omitted longer journeys, and the way channels are grouped may influence the results. For the continuity of this line of research, it is suggested to apply the model to real company databases, using media costs connected via API for a complete Return on Investment (ROI) analysis.
Bibliographic References
ANDERSON, E. T.; CHENG, L. Digital Marketing Analytics: Methods and Applications in Marketing. 2. ed. Boston: Harvard Business Press, 2020.
KAKALEJCÍK, L. et al. Attribution modeling in digital marketing. Journal of Applied Mathematics, v. 12, n. 4, p. 331-336, 2019.
LEVIN, D. A.; PERES, Y.; WILMER, E. L. Markov chains and mixing times. 2. ed. Providence, R.I.: American Mathematical Society, 2017.
MOLNAR, C. Interpretable Machine Learning: A Guide for Making Black Box Models Explainable. 2. ed. 2022. Disponível em: https://christophm.github.io/interpretable-ml-book/. Acesso em: 24 mar. 2026.
Article originating from the Final Course Work of the Specialization in Data Science and Analytics of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform