Marketing Multi-Channel Attribution model with R (part 1: Markov chains concept)

As we know, a customer usually goes through a path/sequence of different channels/touchpoints before a purchase in e-commerce or conversion in other areas. In Google Analytics we can find some touchpoints more likely to assist to conversion than others that more likely to be last-click touchpoint. As most of the channels are paid for (in […]

Read More


Cohort analysis: Retention Rate Visualization with R

When conducting Cohort Analysis, one of the most important measures is Customer Retention Rate. I will share a few ideas for visualizing this parameter in this post. Last year I shared several charts for Customer Retention Rate visualization in this post. However, it is always helpful to analyze and visualize both relative (Customer Retention Rate) and […]

Read More


Measuring business health with Delta LifeCycle Grids and R

There are several posts connected with LifeCycle Grids on this blog. If you are not familiar with the concept I highly recommend you to start with Jim Novo’s book, his blog or, at least, from the first post about on my blog. We will study how to use LifeCycle Grids concept for measuring a health of […]

Read More


Sales Funnel visualization with R

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 […]

Read More


Cohort Analysis with Heatmap

Previously I shared the data visualization approach for descriptive analysis of progress of cohorts with the “layer-cake” chart (part I and part II). In this post, I want to share another interesting visualization that not only can be used for descriptive analysis as well but would be more helpful for analyzing a large number of cohorts. […]

Read More


Cohort Analysis and LifeCycle Grids mixed segmentation with R

This is the third post about LifeCycle Grids. You can find the first post about the sense of LifeCycle Grids and A-Z process for creating and visualizing with R programming language here. Lastly, here is the second post about adding monetary metrics (customer lifetime value – CLV – and customer acquisition cost – CAC) to […]

Read More


Customer segmentation – LifeCycle Grids, CLV and CAC with R

We studied a very powerful approach for customer segmentation in the previous post, which is based on the customer’s lifecycle. We used two metrics: frequency and recency. It is also possible and very helpful to add monetary value to our segmentation. If you have customer acquisition cost (CAC) and customer lifetime value (CLV), you can easily […]

Read More


Customer segmentation – LifeCycle Grids with R

I want to share a very powerful approach for customer segmentation in this post. It is based on customer’s lifecycle, specifically on frequency and recency of purchases. The idea of using these metrics comes from the RFM analysis. Recency and frequency are very important behavior metrics. We are interested in frequent and recent purchases, because frequency […]

Read More


Sequence of shopping carts in-depth analysis with R – Sequence of events

This is the third part of the sequence of shopping carts in-depth analysis. We processed initial data in the required format, did the exploratory analysis and started the in-depth analysis in the first post. Finally, we used cluster analysis for creating customer segments in the second post. As I mentioned in the first post, the sequence can […]

Read More


Sequence of shopping carts in-depth analysis with R – Clustering

This is the second part of the in-depth sequence analysis. In the previous post, we processed data in the required format, plotted a Sankey diagram, and did some distribution, frequency, time lapse and entropy analysis with visualization. For dessert, clustering! Clustering is an exploratory data analysis method aimed at finding automatically homogeneous groups or clusters in the […]

Read More


Sequence of shopping carts in-depth analysis with R

Although the sankey diagram from the previous post provided us with a very descriptive tool, we can consider it a rather exploratory analisys. As I mentioned, sequence mining can give us the opportunity to recommend this or that product based on previous purchases, but we should find the right moment and patterns in purchasing behavior. […]

Read More


Sequence of shopping carts analysis with R – Sankey diagram

We studied how we can visualize the structure of a shopping cart in the previous post. Although you can find a great deal of materials on how to analyze combinations of products in the shopping cart (e.g. via association rules), there is a lack of sources on how to analyze the sequences of shopping carts. […]

Read More


Shopping cart analysis with R – Multi-layer pie chart

This post was updated on 12/05/2015. In this post, we will review a very interesting type of visualization – the Multi-layer Pie Chart – and use it for one of the marketing analytics tasks – the shopping carts analysis. We will go from the initial data processing to the shopping carts analysis visualization. I will share the R […]

Read More


Cohort analysis with R – Retention charts

When we spend more money for attracting new customers then they bring us by the first but, usually, by the next purchases, we appeal to customer’s life-time value (CLV). We expect that customers will spend with us for years and it means we expect to earn some profit finally. In this case, retention is vital parameter. Most of our […]

Read More


Include promo/activity effect into the prediction (extended ARIMA model with R)

I want to consider an approach of forecasting I really like and frequently use. It allows to include the promo campaigns (or another activities and other variables as well) effect into the prediction of total amount. I will use a fictitious example and data in this post, but it works really good with my real data.  So, you can […]

Read More


Cohort analysis with R – “layer-cake graph” (part 2)

Continue to exploit a great idea of ‘layer-cake’ graph. If you liked the approach I shared in the previous topic, perhaps, you would have one or two questions we should answer additionally. Recall “Total revenue by Cohort” chart: As total revenue depends on the number of customers we attracted and on the amount of money each of them spent with us, there […]

Read More


Cohort analysis with R – “layer-cake graph”

Cohort Analysis is one of the most powerful and demanded techniques available to marketers for assessing long-term trends in customer retention and calculating life-time value. If you studied custora’s university, you could be interested in amazing “layer-cake graph” they propose for Cohort Analysis. Custora says: “The distinctive “layer-cake graph” produced by looking at cohorts in calendar time can […]

Read More


Twitter sentiment analysis based on affective lexicons with R

Continue to dig tweets. After we reviewed how to count positive, negative and neutral tweets in the previous post, I discovered another great idea. Suppose positive or negative mark is not enough and we want to understand the rate of positivity or negativity. For example, if word “good” has 4 points rating, but “perfect” has 6. In […]

Read More


Twitter sentiment analysis with R

Recently I’ve designed a relatively simple code in R for analyzing Twitter posts content via calculating the number of positive, negative and neutral words. The idea of processing tweets is based on the presentation The words in the tweet correspond with the words in dictionaries that you can find on the internet or create by yourself. It is […]

Read More