Shapley's Attribution Modelling

Overview

Here we have a proposal for creating an attribution model that can help the business properly attribute conversions and take data driven decisions.

Why we need Multi Channel Attribution Modelling?

Media effective evaluation is an important part of the decision-making process. Since the cost of an advertisement is based on the number of clicks or impressions, it is very important to understand the media effectiveness of each action. Due to the different nature of each channel, it is necessary to understand the marketing effect of each channel. Therefore, in order to understand the impact of online marketing activities, a multi-channel attribution model must be considered.

The Big Challenge in Attribution Modelling

How would you decide to attribute conversions and assign credit to the different channels in your conversion paths?

Do you use the obsolete last-click attribution model? Or the equally flawed first-click attribution model?

Attribution is hard enough without using the over-simplistic attribution models that currently exist.

But imagine if instead of using an attribution model that unfairly gives credit to different channels in a customer’s journey you could use one that assigns credit based on actual influence?

Game Theory

Game theory is used in a number of different fields, including economics, psychology, political science, poker, biology, and computer science. Game theory can be used in either competitive or cooperative situations.

In cooperative situations ( like website channels which all cooperate to drive conversions), something known as the Shapley value (named after game theorist and Nobel prize winner Lloyd Shapley) is used to fairly distribute credit or value to each individual player/channel.

Visual Example of Shapley Value Approach

Let's first start by identifying each player’s contribution when they play individually, when 2 play together, and when all 3 play together.

Then, you need to consider all possible orders and calculate their marginal value – e.g. what value does each player add when player A enters the game first, followed by player B, and then player C.

Below are the 6 possible orders and the marginal value each player adds in the different combinations:

Now that we have calculated each player’s marginal value across all 6 possible order combinations, we now need to add them up and work out the Shapley value (i.e. the average) for each player.

Here’s how it looks:

When you add up Player A's marginal value from the 6 possible orders and divide it by 6, you get a Shapley value of 7.7

When you add up Player B's marginal value from the 6 possible orders and divide it by 6, you get a Shapley value of 3.2

When you add up Player C's marginal value from the 6 possible orders and divide it by 6, you get a Shapley value of 8.1

Now that we have worked out the Shapley value for each player, we can clearly see the true contribution each player made to the game and assign credit fairly. In this example, player C contributed the most, followed by A, then by B.

Why Shapley Value Approach is Better?

Each touchpoint gets fair credit for a conversion based on their true contribution
The Marketing team has a clearer and more accurate picture of the customer journey and can identify which touchpoints perform the best and which ones don’t.
It is better than any custom attribution models provided in Google Analytics since Google Analytics Custom Attribution Models only provide custom rules to change credit for each touchpoint, they do not take into account the combined influence of all the touchpoints in the conversion path

Equation for calculating the Shapley Value

What we need to do to build this Model?

Properly leverage analytics tools and capture user and session level data
Capture marketing data from ad platforms like conversions, revenue, costs and impressions
Utilize a data warehouse like BigQuery to properly blend the data
Utilize GCP Cloud Functions to generate up to date tables with attribution

Architecture Diagram