SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Davide Altomare, David Loris
2016-12-07
R-package ChannelAttribution for the online multichannel
attribution problem.
Introduction
Advertisers use a variety of online marketing channels to reach consumers and they want to know the
degree each channel contributes to their marketing success. It’s called the online multi-channel attribution
problem. In many cases, advertisers approach this problem through some simple heuristics methods that
do not take into account any customer interactions and often tend to underestimate the importance of
small channels in marketing contribution.
R-package ChannelAttribution (https://cran.r-project.org/web/packages/ChannelAttribution/index.html) provides a
function that approaches the attribution problem in a probabilistic way. It uses a k-order Markov
representation to identifying structural correlations in the customer journey data. This would allow
advertisers to give a more reliable assessment of the marketing contribution of each channel. The approach
basically follows the one presented in F. Anderl, I. Becker, F. v. Wangenheim, J.H. Schumann (2014):
Mapping the customer journey: a graph-based framework for attribution modeling. Differently for them,
we solved the estimation process using stochastic simulations. In this way it is possible to take into account
conversion values and their variability in the computation of the channel importance. The package also
contains a function that estimates three heuristic models (first-touch, last-touch and linear-touch
approach) for the same problem.
The following paragraph is a gentle introduction to Markov model. It also contains some considerations on
heuristic models.
Markov Model
Consider the following example in which we have 4 states: (START), A, B, (CONVERSION) and 3 paths
recorded:
PATH CONVERSIONS
(START) -> A -> B -> A -> B -> B -> A -> (CONVERSION) 1
(START) ->A -> B -> B -> A -> A -> (CONVERSION) 1
(START) -> A -> A -> (CONVERSION) 1
TOTAL 3
For every couple of ordered states we count the number of directed edges:
EDGE ARROW.COUNT
(START) -> A 3
(START) -> B 0
A -> A 2
A -> B 3
A -> (CONVERSION) 3
B -> A 3
B -> B 2
B -> (CONVERSION) 0
TOTAL 16
From the table we can calculate the transition probabilities between states:
EDGE ARROW.COUNT TRANSITION.PROBABILITIES
(START) -> A 3 3/3
(START) -> B 0 0
TOT (START) 3
A -> A 2 2/8
A -> B 3 3/8
A -> (CONVERSION) 3 3/8
TOT A 8
B -> A 3 3/5
B -> B 2 2/5
B -> (CONVERSION) 0 0
TOT B 5
Now we have all the information to plot the Markov Graph:
This kind of Markov Graph is called First-Order Markov Graph because the probability of reaching one state
depends only on the previous state visited.
From the Graph, or more clearly from the original data, we see that every path leads to conversion. Thus
the conversion rate of the Graph is 1.
Now we want to define a measure of channel importance using the relationship between states described
by the Graph.
Importance of channel A can be defined as the change in conversion rate if channel A is dropped from the
Graph, or in other terms if channel A becomes a NULL state.
A NULL state is an absorbing state so if one reaches this STATE can’t move on.
This Graph simplifies to
In previous Graph it’s easy to see that if channel A becomes a NULL state there is no way of reaching
conversion from START state. So conversion rate of this Graph is 0. The conversion drops from 1
(conversion of the original Graph) to 0. Thus importance of channel A (defined as the change in conversion
rate) is 1.
In similar way we define the importance of channel B as the change in conversion rate if channel B is
dropped from the Graph, or in other terms if channel B becomes a NULL state.
This Graph simplifies to:
In previous Graph we see the probability of reaching conversion from START state is 0.5. Conversion drops
from 1 (conversion rate of the original Graph) to 0.5. Thus the importance of channel B (defined as the
change in conversion rate) is 0.5.
Once we have the importance weights of every channel we can do a weighted imputation of total
conversions (3 in this case) between channels.
CHANNEL CONVERSIONS
A 2 [ =3 x 1/(1+0.5) ]
B 1 [ = 3 x 0.5/(1+0.5) ]
TOTAL 3
Now let’s go back to the original data:
PATH CONVERSIONS
(START) -> A -> B -> A -> B -> B -> A -> (CONVERSION) 1
(START) ->A -> B -> B -> A -> A -> (CONVERSION) 1
(START) -> A -> A -> (CONVERSION) 1
TOTAL 3
We see that if we use a first-touch or last-touch approach, all the conversions are assigned to channel A,
despite the important work of channel B in “conversion game” is clear from the data.
The channel attribution problem can be viewed as a football match, to better understand how different
approaches work. So channels can be viewed as players, paths are game actions and conversions are goals.
Markov Model analyses relationships between game actions to understand the role of the player in scoring.
While heuristic approach analyzes one action (path) at the time.
So last-touch approach rewards only players who scored, while first-touch approach rewards only players
who started the action. Linear approach rewards with the same credit to every player who took part the
action, while time-decay approaches gives subjective weights to every player who took part the action.
As we have seen Markov Model require as inputs paths and total conversions and does not require
subjective assumptions, differently from heuristic approaches.
Package ChannelAttribution
In the following example we will show how ChannelAttribution can be used for the multichannel
attribution problem.
Load libraries and data:
library(ChannelAttribution)
library(reshape2)
library(ggplot2)
data(PathData)
Estimate heuristic models:
H=heuristic_models(Data,'path','total_conversions',var_value='total_conversion_value')
Estimate Markov model:
M=markov_model(Data, 'path', 'total_conversions', var_value='total_conversion_value')
Plot total conversions:
R=merge(H,M,by='channel_name')
R1=R[,(colnames(R)%in%c("channel_name","first_touch_conversions","last_touch_conversions","linear
_touch_conversions","total_conversion"))]
colnames(R1)=c('channel_name','first_touch','last_touch','linear_touch','markov_model')
R1=melt(R1,id="channel_name")
ggplot(R1, aes(channel_name, value, fill = variable)) +
geom_bar(stat="identity", position = "dodge") +
ggtitle("TOTAL CONVERSIONS")+
theme(axis.title.x = element_text(vjust=-2))+
theme(axis.title.y = element_text(vjust=+2))+
theme(title = element_text(vjust=2))+
theme(text = element_text(size=16)) +
theme(plot.title=element_text(size=20)) +
ylab("")
Plot total value:
R2=R[,(colnames(R)%in%c("channel_name","first_touch_value","last_touch_value","linear_touch_value
","total_conversion_value"))]
colnames(R2)=c('channel_name','first_touch','last_touch','linear_touch','markov_model')
R2=melt(R2,id="channel_name")
ggplot(R2, aes(channel_name, value, fill = variable)) +
geom_bar(stat="identity", position = "dodge") +
ggtitle("TOTAL VALUE")+
theme(axis.title.x = element_text(vjust=-2))+
theme(axis.title.y = element_text(vjust=+2))+
theme(title = element_text(vjust=2))+
theme(text = element_text(size=16)) +
theme(plot.title=element_text(size=20)) +
ylab("")
ChannelAttribution Tool
ChannelAttribution can be used through a user-friendly graphical interface without interfacing with R-code. Channel
Attribution Tool can be found at https://adavide1982.shinyapps.io/ChannelAttribution.
ChannelAttribution Tool can be also used locally through package ChannelAttributionApp.
library(ChannelAttributionApp)
CAapp()
Markov model for the online multichannel attribution problem

More Related Content

PPT
Google Data Studio 360 Tutorial
PPTX
Google Data Studio
PPTX
Google data studio
PPTX
Introduction to Data Visualization
PDF
Inferring the effect of an event using CausalImpact by Kay H. Brodersen
PPTX
Diabetes Mellitus
PPTX
Hypertension
PPTX
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx
Google Data Studio 360 Tutorial
Google Data Studio
Google data studio
Introduction to Data Visualization
Inferring the effect of an event using CausalImpact by Kay H. Brodersen
Diabetes Mellitus
Hypertension
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx

What's hot (20)

PPTX
Churn Analysis in Telecom Industry
PPTX
Model Selection Techniques
PDF
churn prediction in telecom
PPTX
Over fitting underfitting
PPTX
Social Media Mining - Chapter 4 (Network Models)
PPTX
Social Media Mining - Chapter 3 (Network Measures)
PPTX
Market Basket Analysis
PPTX
Markov presentation
PPT
M A R K O V C H A I N
PDF
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
PPTX
K means clustring @jax
PDF
Social media plan
PDF
Data Restart 2022: Hana Bartoňková a Vojtěch Říha - Kolik mi vydělá jeden člá...
DOCX
Boston housing data analysis
PPT
Big Data: Social Network Analysis
PPTX
Social Network Analysis Introduction including Data Structure Graph overview.
PDF
Time Series Analysis with R
PPTX
Social Media Mining - Chapter 6 (Community Analysis)
PPTX
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
PDF
SEO Restart 2022: Richard Klačko - Investice do SEO? Vypočítejme si potenciál...
Churn Analysis in Telecom Industry
Model Selection Techniques
churn prediction in telecom
Over fitting underfitting
Social Media Mining - Chapter 4 (Network Models)
Social Media Mining - Chapter 3 (Network Measures)
Market Basket Analysis
Markov presentation
M A R K O V C H A I N
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
K means clustring @jax
Social media plan
Data Restart 2022: Hana Bartoňková a Vojtěch Říha - Kolik mi vydělá jeden člá...
Boston housing data analysis
Big Data: Social Network Analysis
Social Network Analysis Introduction including Data Structure Graph overview.
Time Series Analysis with R
Social Media Mining - Chapter 6 (Community Analysis)
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
SEO Restart 2022: Richard Klačko - Investice do SEO? Vypočítejme si potenciál...
Ad

Viewers also liked (16)

PPTX
Webinar: Improve Campaign Results with Multi-Channel Funnels and Acquisio Att...
PDF
Multi touch attribution & attribution modeling - GAUC Sydney Melbourne - 2013...
PPTX
How to Build an Attribution Solution in 1 Day
PPTX
How To Make Your Marketing Match Your Reality (#mozcon 2015)
PDF
GAUC 2017 Workshop Attribution with Google Analytics: Peter Falcone (Google)
PPTX
Attribution Super Modeling with Google Analytics
PPTX
Advanced attribution model
PPTX
Introduction to Google Analytics
PDF
Webinar: Survival Analysis for Marketing Attribution - July 17, 2013
PDF
Digital Attribution Modeling Using Apache Spark-(Anny Chen and William Yan, A...
PDF
Web Analytics Attribution
PDF
Attribution Modeling - Case Study
PDF
Operational Attribution with Google Analytics
PPTX
Attribution Modeling and Big Data, Google
PDF
Red Door Interactive: Contribution-Attribution-Mix, Oh My! Creating Content f...
PDF
Marketing Attribution 101: Understanding Attribution and Calculating Cost of ...
Webinar: Improve Campaign Results with Multi-Channel Funnels and Acquisio Att...
Multi touch attribution & attribution modeling - GAUC Sydney Melbourne - 2013...
How to Build an Attribution Solution in 1 Day
How To Make Your Marketing Match Your Reality (#mozcon 2015)
GAUC 2017 Workshop Attribution with Google Analytics: Peter Falcone (Google)
Attribution Super Modeling with Google Analytics
Advanced attribution model
Introduction to Google Analytics
Webinar: Survival Analysis for Marketing Attribution - July 17, 2013
Digital Attribution Modeling Using Apache Spark-(Anny Chen and William Yan, A...
Web Analytics Attribution
Attribution Modeling - Case Study
Operational Attribution with Google Analytics
Attribution Modeling and Big Data, Google
Red Door Interactive: Contribution-Attribution-Mix, Oh My! Creating Content f...
Marketing Attribution 101: Understanding Attribution and Calculating Cost of ...
Ad

Similar to Markov model for the online multichannel attribution problem (20)

PDF
Robust and real time detection of
PDF
Robust and Real Time Detection of Curvy Lanes (Curves) Having Desired Slopes ...
PDF
Line uo,please
PDF
PDF
Adjusting PageRank parameters and comparing results : REPORT
PDF
Adjusting PageRank parameters and comparing results : REPORT
PDF
Adjusting PageRank parameters and comparing results : REPORT
PPTX
Gradient Decent in Linear Regression.pptx
DOC
Customer Lifetime Value Modeling
PDF
Methods for Reducing the Activity Switching Factor
PDF
A Review on Channel Routing On VLSI Physical Design
PDF
DEA SolverPro Newsletter19
PPTX
Query Optimization By Example on Database Apps
PPTX
Signal Processing Assignment Help
PPTX
Computer organization
PPTX
bus and memory tranfer (computer organaization)
PDF
Resolution of Some Cases of Bgp Inter-Domain Oscillations with the Spvpoc Alg...
DOCX
cs 3351 dpco
PDF
Kc3418141820
PDF
Unit 3 Arithmetic building blocks and memory Design (1).pdf
Robust and real time detection of
Robust and Real Time Detection of Curvy Lanes (Curves) Having Desired Slopes ...
Line uo,please
Adjusting PageRank parameters and comparing results : REPORT
Adjusting PageRank parameters and comparing results : REPORT
Adjusting PageRank parameters and comparing results : REPORT
Gradient Decent in Linear Regression.pptx
Customer Lifetime Value Modeling
Methods for Reducing the Activity Switching Factor
A Review on Channel Routing On VLSI Physical Design
DEA SolverPro Newsletter19
Query Optimization By Example on Database Apps
Signal Processing Assignment Help
Computer organization
bus and memory tranfer (computer organaization)
Resolution of Some Cases of Bgp Inter-Domain Oscillations with the Spvpoc Alg...
cs 3351 dpco
Kc3418141820
Unit 3 Arithmetic building blocks and memory Design (1).pdf

Recently uploaded (20)

PDF
Deliverable file - Regulatory guideline analysis.pdf
PDF
pdfcoffee.com-opt-b1plus-sb-answers.pdfvi
PPT
Chapter four Project-Preparation material
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PPTX
Principles of Marketing, Industrial, Consumers,
PDF
Nidhal Samdaie CV - International Business Consultant
PPTX
Lecture (1)-Introduction.pptx business communication
PPT
Lecture 3344;;,,(,(((((((((((((((((((((((
PDF
How to Get Funding for Your Trucking Business
PDF
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
PDF
How to Get Business Funding for Small Business Fast
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Chapter 5_Foreign Exchange Market in .pdf
PDF
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...
PDF
Daniels 2024 Inclusive, Sustainable Development
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
2025 Product Deck V1.0.pptxCATALOGTCLCIA
PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
Deliverable file - Regulatory guideline analysis.pdf
pdfcoffee.com-opt-b1plus-sb-answers.pdfvi
Chapter four Project-Preparation material
Ôn tập tiếng anh trong kinh doanh nâng cao
Principles of Marketing, Industrial, Consumers,
Nidhal Samdaie CV - International Business Consultant
Lecture (1)-Introduction.pptx business communication
Lecture 3344;;,,(,(((((((((((((((((((((((
How to Get Funding for Your Trucking Business
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
How to Get Business Funding for Small Business Fast
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Chapter 5_Foreign Exchange Market in .pdf
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...
Daniels 2024 Inclusive, Sustainable Development
Reconciliation AND MEMORANDUM RECONCILATION
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
HR Introduction Slide (1).pptx on hr intro
2025 Product Deck V1.0.pptxCATALOGTCLCIA
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx

Markov model for the online multichannel attribution problem

  • 1. Davide Altomare, David Loris 2016-12-07 R-package ChannelAttribution for the online multichannel attribution problem. Introduction Advertisers use a variety of online marketing channels to reach consumers and they want to know the degree each channel contributes to their marketing success. It’s called the online multi-channel attribution problem. In many cases, advertisers approach this problem through some simple heuristics methods that do not take into account any customer interactions and often tend to underestimate the importance of small channels in marketing contribution. R-package ChannelAttribution (https://cran.r-project.org/web/packages/ChannelAttribution/index.html) provides a function that approaches the attribution problem in a probabilistic way. It uses a k-order Markov representation to identifying structural correlations in the customer journey data. This would allow advertisers to give a more reliable assessment of the marketing contribution of each channel. The approach basically follows the one presented in F. Anderl, I. Becker, F. v. Wangenheim, J.H. Schumann (2014): Mapping the customer journey: a graph-based framework for attribution modeling. Differently for them, we solved the estimation process using stochastic simulations. In this way it is possible to take into account conversion values and their variability in the computation of the channel importance. The package also contains a function that estimates three heuristic models (first-touch, last-touch and linear-touch approach) for the same problem. The following paragraph is a gentle introduction to Markov model. It also contains some considerations on heuristic models. Markov Model Consider the following example in which we have 4 states: (START), A, B, (CONVERSION) and 3 paths recorded: PATH CONVERSIONS (START) -> A -> B -> A -> B -> B -> A -> (CONVERSION) 1 (START) ->A -> B -> B -> A -> A -> (CONVERSION) 1 (START) -> A -> A -> (CONVERSION) 1 TOTAL 3 For every couple of ordered states we count the number of directed edges: EDGE ARROW.COUNT (START) -> A 3 (START) -> B 0 A -> A 2 A -> B 3 A -> (CONVERSION) 3 B -> A 3 B -> B 2
  • 2. B -> (CONVERSION) 0 TOTAL 16 From the table we can calculate the transition probabilities between states: EDGE ARROW.COUNT TRANSITION.PROBABILITIES (START) -> A 3 3/3 (START) -> B 0 0 TOT (START) 3 A -> A 2 2/8 A -> B 3 3/8 A -> (CONVERSION) 3 3/8 TOT A 8 B -> A 3 3/5 B -> B 2 2/5 B -> (CONVERSION) 0 0 TOT B 5 Now we have all the information to plot the Markov Graph: This kind of Markov Graph is called First-Order Markov Graph because the probability of reaching one state depends only on the previous state visited. From the Graph, or more clearly from the original data, we see that every path leads to conversion. Thus the conversion rate of the Graph is 1. Now we want to define a measure of channel importance using the relationship between states described by the Graph. Importance of channel A can be defined as the change in conversion rate if channel A is dropped from the Graph, or in other terms if channel A becomes a NULL state. A NULL state is an absorbing state so if one reaches this STATE can’t move on.
  • 3. This Graph simplifies to In previous Graph it’s easy to see that if channel A becomes a NULL state there is no way of reaching conversion from START state. So conversion rate of this Graph is 0. The conversion drops from 1 (conversion of the original Graph) to 0. Thus importance of channel A (defined as the change in conversion rate) is 1. In similar way we define the importance of channel B as the change in conversion rate if channel B is dropped from the Graph, or in other terms if channel B becomes a NULL state.
  • 4. This Graph simplifies to: In previous Graph we see the probability of reaching conversion from START state is 0.5. Conversion drops from 1 (conversion rate of the original Graph) to 0.5. Thus the importance of channel B (defined as the change in conversion rate) is 0.5. Once we have the importance weights of every channel we can do a weighted imputation of total conversions (3 in this case) between channels. CHANNEL CONVERSIONS A 2 [ =3 x 1/(1+0.5) ] B 1 [ = 3 x 0.5/(1+0.5) ] TOTAL 3 Now let’s go back to the original data: PATH CONVERSIONS (START) -> A -> B -> A -> B -> B -> A -> (CONVERSION) 1 (START) ->A -> B -> B -> A -> A -> (CONVERSION) 1 (START) -> A -> A -> (CONVERSION) 1 TOTAL 3 We see that if we use a first-touch or last-touch approach, all the conversions are assigned to channel A, despite the important work of channel B in “conversion game” is clear from the data. The channel attribution problem can be viewed as a football match, to better understand how different approaches work. So channels can be viewed as players, paths are game actions and conversions are goals. Markov Model analyses relationships between game actions to understand the role of the player in scoring. While heuristic approach analyzes one action (path) at the time. So last-touch approach rewards only players who scored, while first-touch approach rewards only players who started the action. Linear approach rewards with the same credit to every player who took part the action, while time-decay approaches gives subjective weights to every player who took part the action. As we have seen Markov Model require as inputs paths and total conversions and does not require subjective assumptions, differently from heuristic approaches.
  • 5. Package ChannelAttribution In the following example we will show how ChannelAttribution can be used for the multichannel attribution problem. Load libraries and data: library(ChannelAttribution) library(reshape2) library(ggplot2) data(PathData) Estimate heuristic models: H=heuristic_models(Data,'path','total_conversions',var_value='total_conversion_value') Estimate Markov model: M=markov_model(Data, 'path', 'total_conversions', var_value='total_conversion_value') Plot total conversions: R=merge(H,M,by='channel_name') R1=R[,(colnames(R)%in%c("channel_name","first_touch_conversions","last_touch_conversions","linear _touch_conversions","total_conversion"))] colnames(R1)=c('channel_name','first_touch','last_touch','linear_touch','markov_model') R1=melt(R1,id="channel_name") ggplot(R1, aes(channel_name, value, fill = variable)) + geom_bar(stat="identity", position = "dodge") + ggtitle("TOTAL CONVERSIONS")+ theme(axis.title.x = element_text(vjust=-2))+ theme(axis.title.y = element_text(vjust=+2))+ theme(title = element_text(vjust=2))+ theme(text = element_text(size=16)) + theme(plot.title=element_text(size=20)) + ylab("")
  • 6. Plot total value: R2=R[,(colnames(R)%in%c("channel_name","first_touch_value","last_touch_value","linear_touch_value ","total_conversion_value"))] colnames(R2)=c('channel_name','first_touch','last_touch','linear_touch','markov_model') R2=melt(R2,id="channel_name") ggplot(R2, aes(channel_name, value, fill = variable)) + geom_bar(stat="identity", position = "dodge") + ggtitle("TOTAL VALUE")+ theme(axis.title.x = element_text(vjust=-2))+ theme(axis.title.y = element_text(vjust=+2))+ theme(title = element_text(vjust=2))+ theme(text = element_text(size=16)) + theme(plot.title=element_text(size=20)) + ylab("") ChannelAttribution Tool ChannelAttribution can be used through a user-friendly graphical interface without interfacing with R-code. Channel Attribution Tool can be found at https://adavide1982.shinyapps.io/ChannelAttribution. ChannelAttribution Tool can be also used locally through package ChannelAttributionApp. library(ChannelAttributionApp) CAapp()