Marketing Channel Attribution with Markov Chains in Python — Part 1: The “Simpler” Approach

Morten Hegewald
11 min readMar 10, 2019

Any business that’s actively running marketing campaigns should be interested in identifying what marketing channels drive the actual conversions. It is no secret that the return on investment (ROI) on your marketing efforts is a crucial KPI.

In this article we’re going to cover:

  1. Why is channel attribution important?
  2. The 3 standard attribution models
  3. An advanced attribution model: Markov Chains
  4. How to build the 4 attribution models in Python

The Markov Chains approach in this article will take a “simple” approach by leveraging the R package ChannelAttribution. For the full python implementation of this solution see part 2 in this series.

Why is attribution important?

As the array of platforms on which businesses can market to their customers is increasing, and most customers are engaging with your content on multiple channels, it’s now more important than ever to decide how you’re going to attribute conversions to channels. A 2017 study showed that 92% of consumers visiting a retailer’s website for the first time aren’t there to buy (link).

--

--

Morten Hegewald

I work as a Data Scientist at Wealthsimple where I use data science to help people achieve financial freedom.