Sales Funnel visualization with R

Published July 16, 2015   |   

Sales (purchasing or conversion) Funnel is a consumer-focused marketing model which illustrates the theoretical customer journey towards the purchase of a product or service. Classically, the Sales funnel includes at least four steps:

  • Awareness– the customer becomes aware of the existence of a product or service,
  • Interest – actively expressing an interest in a product group,
  • Desire – aspiring to a particular brand or product,
  • Action – taking the next step towards purchasing the chosen product.

There can be more steps and this depends on the business model and level of detail you want to/can represent. Obviously, there is quite a lot of creative work in order to establish the model and define the steps of the customer journey in practice. Once you managed this it is always interesting to see the result in visual form. Usually, the Sales Funnel looks like a tornado and it narrows from the top to the bottom. Therefore, the Sales Funnel allows you to find where there is a bottle funnel neck or what is the step where you lose customers.
We will study a very simple example of creating a Sales Funnel by focusing on visualization in this post.
If we speak about e-commerce, we can use content of the site for defining steps. Let’s assume that our main page and landing pages of ad campaigns are responsible for the Awareness step. The pages with product or service descriptions correspond to the Interest from customers. Shopping cart page confirms the Desire. Finally, the conversion page (“thank you page”) is the Action. In other words, our theoretical customer journey looks like the following:
Customer’s seen our advertisement and clicked on it
Landed on the landing page
Was interested and moved to the product description
Wanted the product and added it to the shopping cart
Purchased.
Note: you can distribute all pages to the Sales Funnel steps with the content grouping option in Google Analytics. Further, you can find a lot of examples on how to extract data from Google Analytics directly from R via API. And if you use the Google Analytics content grouping option you can extract these groups.
Let’s say we have a dataset with the grouped pages and number of sessions (visits). Further, we need to define which pages belong to each step of the funnel:
cap 1
Furthermore, we can make some improvements to the bottom of the Sales Funnel. If you use LifeCycle Grids you can identify the customer’s lifecycle phase. Therefore, we can represent a breakdown of customers who made purchases into their status (e.g. new customer, engaged and loyal). If you are not familiar with the LifeCycle Grids approach, please start here.
Here is our data set with the number of customers and their statuses:
cap 2
By using the same column names with the content table, it is easier to combine data.
The logic behind the R code is simple: we need to combine tables, define the order of steps, calculate dummy values for centering bars, calculate a share of session proceeded to the next step and plot the result:
cap 3
Let’s go through the plot: there are stacked bars on the top of the chart that represent the total number of sessions (visits) at each step of Sales Funnel. 78.3% of sessions went from the Awareness step to the Interest one, 72.2% from the Interest to the Desire and 92.3% from the Desire to the Action. Even though it is not necessary, we used another logic at the bottom of the Funnel. If we can identify the customer’s type, we can split the total number of Actions (120K in our case) into different customer types (e.g. new, engaged and loyal customers). Further, we calculated the share of each customer type in the Action (20.8%, 33.3% and 45.8%). If we aren’t new in the market and have a number of loyal customers, we would take the hourglass view of the Sales Funnel.
This article originally appeared here. Republished with permission. Submit your copyright complaints here.