Finding a Marketing Mix with Google Analytics Multi Channel Funnels and R

Google Analytics Multi Channel Analysis

Online marketing channels such as Paid Search and Display Advertising are used by scores of organizations to improve outreach.  Having the ability to improve your visibility by simply purchasing traffic is very useful.  What is not useful, at least for most marketing organizations is having to come to grips around whether the money for said traffic was spent as efficiently as possible.  Most organizations will simply use the Acquisition reporting in Google Analytics to learn of how much traffic their marketing campaigns generate (bad).  Some will even venture to see how many conversions or revenue they produce (better but still bad).

Only the savvy organization will employ the technique known as “multi-session marketing analytics.”  This technique uses user and session data in order to analyze the activity of users across multiple sessions.  This improves on the simplistic “last click” attribution model used for the regular Google Analytics Acquisition reporting.  Google has provided some reporting tools for this type of analysis in the Multi-Channel Funnels and Attribution reporting found under the “Conversions” tab in Google Analytics.  The Model Comparison Tool report can even be used to compare different models (i.e. “last click”, “first click”, etc.).

multi session marketing analysis
Model Comparison Tool in Google Analytics

The unfortunate thing about using these models is that there is no such thing as a one-size fits all model for analyzing a site’s marketing channels.  Each site has it’s own flavor and it’s own user base with it’s own marketing behavior.

In order to deal with this issue, an organization could either pay for Google Premium (which uses machine learning algorithm to predict the best model to use) or it could run a probabilistic model on its GA data. Markov Chain is one of the easier models to use. It is also a model that is used by a number of marketing attribution analytics consultancies.

I’m no statistician, but I believe the simplest way to explain Markov Chain is that is way of describing the probability of events based on the most previous event state. In this case each event is a session with an assigned medium and the result is the re-assigning of values based on the highest probabilities of conversion.  Read more on Markov Chain here.

Markov Chain for Marketing Analysis
Markov Chain Illustration

Good thing for those of us that have no advanced math degree, there is a package for R called ChannelAttribution which allows us to run the Markov Chain model on data direct from the Google Analytics API. It also compares the Markov Chain model to other models such as last touch, first touch and linear without much fuss.  There is a great tutorial on using ChannelAttribution on the Lunametrics Blog.  Read below to see how this technique can be used with data direct from the Google Analytics API in R.  The script seems a bit verbose, but it works very well, thanks to Kaelin Harmon!

This produces a dataframe and a plot which compares each of the heuristic models (last touch, first touch, linear) and the Markov Model.

Multi Session Analysis in R
Heuristic Models vs Markov Model

If you liked this post, you might want to take a look at my last post on using the GA API and R as an alternative to Google Analytics Premium or just leave me a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *