42
How to build an attribution solution in a day - well maybe a couple of days ;) Dr. Phillip Law

How to Build an Attribution Solution in 1 Day

Embed Size (px)

Citation preview

Page 1: How to Build an Attribution Solution in 1 Day

How to build an attribution solution in a day- well maybe a couple of days ;)Dr. Phillip Law

Page 2: How to Build an Attribution Solution in 1 Day

• By the end of this Talk I want to give you the tools and methods to be able to go away and build your own solution.

• I started this on Monday and got something useable in a day, then it took me a couple of days to polish this up and iron out any bugs.

• It’s not perfect, but give you an attribution solution with contextual data and importantly the power to slice and dice.

Page 3: How to Build an Attribution Solution in 1 Day
Page 4: How to Build an Attribution Solution in 1 Day

Overview• Blurb About Me and the Company I work For.• Quick Overview of Rules Based attribution.• Discuss the tools I used and why, this is effectively an ETL process using

Python and Tableau.• How I extracted the data.• What Transformations I did using Python.• What Transformations I did in Tableau.• Run through the models in Tableau.• Limitations (Scalability)• Next Steps (Improve the models, Allocation of Credit, Bayesian attribution)

Page 5: How to Build an Attribution Solution in 1 Day
Page 6: How to Build an Attribution Solution in 1 Day
Page 7: How to Build an Attribution Solution in 1 Day

About me: Dr. Phillip Law

Page 8: How to Build an Attribution Solution in 1 Day

© 2016 YOUR FAVOURITE STORY ALL RIGHTS RESERVED

.

Page 9: How to Build an Attribution Solution in 1 Day

To craft powerful digital experiences to help our clientsgrow

•Our Mission

Page 10: How to Build an Attribution Solution in 1 Day

CLIENTS LOGOS

Page 11: How to Build an Attribution Solution in 1 Day

1. Improving Marketing Performance

Improving conversion throughout the

customer journey and reducing inefficiency.

In a world where customer experience is the brand experience.

Digital has great power.

2. Brand Building 3. Future Proofing

It is particularly important to work to future web standards

and consumer patterns to create lasting solutions.

Page 12: How to Build an Attribution Solution in 1 Day

Reporting & implementation(Adobe and GA)

SEO & PPC

Data Science (modelling)

Data Visualisation (D3, Tableau)

Growth Audits

Optimisation (A/B Testing, Videos)

Analytics

Page 13: How to Build an Attribution Solution in 1 Day

Attribution

Page 14: How to Build an Attribution Solution in 1 Day
Page 15: How to Build an Attribution Solution in 1 Day

Attribution Model Types (Sort of)

RULES BASE BAYESIAN

Page 16: How to Build an Attribution Solution in 1 Day

Attribution Model Types?

RULES BASE WEIGHTING

2. USE THE SHAPLEY VALUE (GAME THEORY)

BAYESIAN MODELS

Page 17: How to Build an Attribution Solution in 1 Day

Types of Models1.First Touch2.Last Touch3.Linear/Evens4.Starter Player Closer5.Temporal6.Spatial

Page 18: How to Build an Attribution Solution in 1 Day

(Raw Data Feed)

(Credit to Marketing Channels)

Page 19: How to Build an Attribution Solution in 1 Day

Right Tools for the Job

Page 20: How to Build an Attribution Solution in 1 Day

Transformation

Visualise

Raw Data Feed

Page 21: How to Build an Attribution Solution in 1 Day

Raw Data Feed

Because of file size you’ll probably need to get it delivered to an FTP

You can ask for the full data feed, this file is delivered hourly and contains all data, this file is Huge, you can get this delivered to D3 on the amazon cloud, which is nice

Page 22: How to Build an Attribution Solution in 1 Day

Raw Data Feed

Because of file size you’ll probably need to get it delivered to an FTP

You can ask for the full data feed, this file is delivered hourly and contains all data, this file is Huge, you can get this delivered to D3 on the amazon cloud, which is nice

Page 23: How to Build an Attribution Solution in 1 Day

Process this Data File in Python (4 Steps)(Did this whole thing in 140 lines of code)

Step 1: Clean file (remove all page views where page views equals zero), flag fist touch point in visit, count page views in

visits, create sort key.

Step 2: Group by tracking ID, and sort by time (need to sort by the sort key), flag conversion event (Only one conversion Event

per Visitor)

Step 3: Read in file backwards, create attribution window, count touch points from conversion, write conversion time to the same

row as the conversion touchpoint.

Step 4: Re-order file and step three reversed the process.

Page 24: How to Build an Attribution Solution in 1 Day

Next Step to Open in Tableau

Page 25: How to Build an Attribution Solution in 1 Day

Next Steps

Page 26: How to Build an Attribution Solution in 1 Day
Page 27: How to Build an Attribution Solution in 1 Day

Fair Allocation of

Credit

Page 28: How to Build an Attribution Solution in 1 Day
Page 29: How to Build an Attribution Solution in 1 Day

Traditional rules for assigning credit are arbitrary not and do not reflect the true weighing of a touch point.

Weightings are skewed towards channels that retarget

There is a method from game theory that has been mathematically proven to allocate credit in a fair way.

Shapley Value

Page 30: How to Build an Attribution Solution in 1 Day

PPC Social

Email

$100

PPC Social $230

Page 31: How to Build an Attribution Solution in 1 Day

Email

PPC Social

$230

$50

PPC $90

Social $85

Email

$100

PPC

Social Email

PPC Social Email

$55

$150

$160

No Touchpoint

PPC Social Email

PPC Email Social

Social PPC Email

Social Email PPC

Email PPC Social

Email Social PPC

PPC Social Email

40 10 130

40 60 80

15 35 130

70 35 75

95 80 5

70 105 5

55 54 71

Average

Page 32: How to Build an Attribution Solution in 1 Day

Only Considers People

Who Convert

Page 33: How to Build an Attribution Solution in 1 Day

BAYESIAN

Page 34: How to Build an Attribution Solution in 1 Day

𝑝 (𝑃𝑃𝐶)

𝑝 (𝑃𝑃𝐶)

𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑃𝑃𝐶∩𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑃𝑃𝐶∩𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑃𝑃𝐶∩𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

𝑝 (𝑃𝑃𝐶∩𝑐𝑜𝑛𝑣𝑒𝑟𝑡 )

Page 35: How to Build an Attribution Solution in 1 Day

𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡 |𝑃𝑃𝐶 ) 𝑝 (𝑐𝑜𝑛𝑣𝑒𝑟𝑡   |𝑃𝑃𝐶 )Probability they would have

converted anyway

Difference in probabilities is the impact that channel has on

conversion

∆ 𝑝

Probability someone converts given that they have seen a PPC

ad

Page 36: How to Build an Attribution Solution in 1 Day

Advantages

• Using the Shapley value provides a more “true” allocation of the influence of channels.

• Bayesian model takes into account user journey that don’t convert. Understand unconverted users that are the best prospect of conversion.

Page 37: How to Build an Attribution Solution in 1 Day

£5000

Page 38: How to Build an Attribution Solution in 1 Day
Page 39: How to Build an Attribution Solution in 1 Day

£750

Page 40: How to Build an Attribution Solution in 1 Day

31st October

Page 41: How to Build an Attribution Solution in 1 Day
Page 42: How to Build an Attribution Solution in 1 Day

Any [email protected]

https://uk.linkedin.com/in/piplaw