Visualizing Customer Journey Using Sankey Diagram
Customer journey mapping is the visual process of plotting a customer’s journey and analyzing their interactions with a brand. This helps companies look at their business from the customer’s viewpoint. That, in turn, helps a business get insights into a customer’s pain points to be able to resolve them. This can be accomplished by preparing charts, heatmaps, and other interactive visualizations, including the Sankey diagram.
But running analyses with some numbers in a sheet for this kind of mapping does not inspire much thought. What is needed then is well-constructed, easy-to-grasp visualization to understand how your customers move and interact with your brand.
There are several interactive visualizations available for this purpose such as charts, heat maps, and so on. Also on the list is the Sankey diagram, offering a better understanding of the complex data needed for customer path analytics, though it has its own limitations that we shall discuss later in the post.
As we had said in one of our earlier blog posts on the Sankey diagram, this type of visualization is generally used to depict “a flow” from one set of values to the next. They are so named after an Irishman, Capt. Matthew Sankey first used them in a publication on the energy efficiency of a steam engine in 1898.
Main Components Of A Sankey Diagram
It consists of the following:
Nodes: Representing the events in each path, a “Node” is an element linked by “Flows”
Flows: They link the nodes. Each flow is specified by the names of its source and target nodes in the “from” and “to” fields. The value in the width field defines the thickness of the flow.
Drop-offs: A drop-off is a flow without a target node, and refers to the link that ends at the present node. It occurs when at least one of the paths continues beyond a node.
What Is A Customer Journey Map?
Before delving deeper into the Sankey Diagram let’s first understand what exactly is a customer journey map. Like we said earlier in this post, it is a visual representation of the buyer’s movement across all touchpoints of your brand. The latter is in the form of a website, social media channels, live chat, and even offline channels.
This customer journey mapping helps businesses get insights into common customer pain points which, in turn, allows them to better optimize and personalize the customer experience. An example: This kind of user journey can help you scientifically understand why a customer abandoned his cart on your e-commerce website and reduce such instances. Was it because the payment gateway was too cumbersome to use? Or because the link to the gateway showed a 404 error? Another example could be of a buyer shopping for a specific item on your website, then moving on to one of your social media channels to continue his shopping there.
Mapping Buyer Journeys With Sankey Diagrams
Sankey diagrams and Sankey charts were originally used for visualization and the analysis of energy flows but they are a great tool to depict the flow of money, time, and resources, too. Directional arrows between the nodes show the flows in a process, production system, or supply chain. What they help any business to do is to effectively communicate the data-based messaging to external or internal stakeholders like your customers or marketing teams, respectively. In fact, a Sankey Diagram or Sankey chart can be very useful in digital marketing analysis.
Benefits of using Sankey diagrams
Simply collecting your customer’s behavior is not enough for any business. It needs to analyze the same for actionable insights. Sankeys can do that by:
- supporting multiple viewing levels wherein one can drill down to granular insights or see specific detail
- making your most prolific shoppers stand out
- showing areas that can be improved upon
- showing areas with the largest opportunities
Express Analytics’ Oyster CDP makes it possible for clients to use a Sankey diagram to visualize their customer journey and analyze the same. Get in touch for more information.
Drawbacks in using a Sankey diagram
- Sankey diagrams get cumbersome to draw when presenting complex data, say with three or more nodes. But this downside can be circumvented today with the availability of open-source tools
- When presenting a Sankey diagram, remember the one golden rule that the width of the lines and arrows represent the actual amounts or volumes of resources. Often, developers make a mistake here
- Overly complex data is a bit difficult to depict using a Sankey Diagram
- Not best for comparison of values
How To Create A Sankey Diagram To Map A Customer’s Journey
Our in-house data analyst Mehar Singh Gambhir explains how to actually develop a Sankey diagram to map a buyer’s journey:
In this particular example of visualizing a customer’s journey throughout his/her buying experience, we start by listing the various touchpoints (nodes) that a customer goes through before a purchase is made. We have considered a basic e-commerce platform for this exercise, and have depicted its traffic flow based on our experience of using and working with such platforms.
From landing on an online shopping website or opening an app, to make a purchase, there are several nodes involved at various stages along which traffic is directed. A company can track customers proceeding from one buying stage to another, or find out how many of them have left abruptly. A graphic visualization like the Sankey diagram, depicting the flow of traffic across several buying stages, is a handy tool for this purpose.
The nodes at each level can vary based on the company and depending on what data points the company wants to be covered. A customer’s journey starts from landing on the company’s website or its app from different sources. The most common event cases can be listed as:
- Direct logging into the website/app and browsing products
- Landing via organic search (redirected from a search engine based on a product search without ad/promotion)
- Clicking on an advertisement link from an external website or social media
From our experience of working with various retail firms, these are the most common data points and links considered for mapping a customer’s journey in a Sankey diagram. Based on whether the customer has the app installed, the next level involves browsing from a mobile app or the website.
From here on, there are several possibilities of how this journey may end:
- If they are really interested in the product, they view the product features in detail along with its price, while some leave without any further activity
- Some may also read the reviews and ratings about the product and then add it to their carts, leave the page or click on some other product
- Others may only be visiting to review their previous purchase. These link helps to understand customer behavior online and how he reacts at different steps
- Some customers may proceed to checkout after adding items to their cart, while others may shop for more products and add further to their cart
- Some customers may abandon their carts or clear their cart and exit. Even at the checkout point, it does happen that some customers decide against purchasing. Or, they may encounter some issue during payment, which means loss of a sale
This information can be used to find the weak links in the website/app and make respective improvements.
The first step was to count the nodes (n) and assign each node a number from 0 to n-1, followed by storing the labels for each node in numerical order in a list.
We designed this visualization with 15 nodes with 7 different levels and a total of 29 links between them. The distribution of traffic from one node to another is based on dummy data, but the actual traffic flow can be extracted from raw data by some processing.
The nodes involved are:
- Landing From(0)
- External Ad/Link(1)
- Direct Search(2)
- Organic Search (3)
- Mobile App(4)
- Official Website(5)
- View product & details(6)
- Read Reviews (7)
- Click on another product (8)
- Add to Cart (9)
- Clear Cart(11)
- Give Reviews/Ratings(13)
After defining the nodes and their labels, separate lists of source and target nodes were created at each level for all the links. Do not forget that the list of source and target nodes should be in the same order as the links. Another list for defining the weight of the links following the same order is called “value” and that depends on the amount of traffic that moves from a source to a target node. Then while plotting the actual figure, we defined the colors and the width for the nodes as well the links based on what information to depict that combination.
Once all these steps were completed, this is the Sankey diagram we created:
The diagram is quite interactive in the Python viewer, and by hovering the mouse over nodes one can look at the incoming weight and outgoing weights.
In Conclusion: A much under-rated visualization tool, Sankey diagrams, even today, can be used for visualization of events like a customer journey. They can be used to communicate your messaging effectively. Though a little cumbersome to draw, some of the best ways of creating Sankey diagrams are D3’s Sankey toolkit by Michael Bostock, charts in R, or by using Pandas library in Python or Plotly, another Python graphing library.
An Engine That Drives Customer Intelligence
Oyster is not just a customer data platform (CDP). It is the world’s first customer insights platform (CIP). Why? At its core is your customer. Oyster is a “data unifying software
Liked This Article?
Gain more insights, case studies, information on our product, customer data platform