Unlocking Business Insights with the Sankey Diagram

As we build highly accurate predictions for creating lookalike audiences for our customers, one powerful visual that we have that shows the transformation of their new customer base from at-risk and churning to loyal, valuable customers is the Sankey Diagram. The Sankey diagram was named after Irish engineer Matthew Henry Phineas Riall Sankey.
Sankey diagrams illustrate a system’s flow of energy, resources, or materials. Originally developed for engineering and environmental applications, Sankey diagrams depict the distribution and transformation of quantities from one state to another within a complex network or process. These diagrams visualize the inputs, outputs, and flows between various system components, providing a clear overview of how resources are allocated and utilized.
Sankey Diagrams versus User Flow Diagrams
Sankey diagrams are not user flow diagrams. While both are powerful visualization tools, they serve distinct purposes and represent different data types. Understanding the differences between these two diagrams is crucial for effectively analyzing and interpreting data in various contexts.

User flow diagrams are commonly used in web analytics and app development to visualize users’ paths as they navigate through a website or application. These diagrams map out the sequence of pages or screens users visit, providing insights into user behavior and interaction patterns. By visually representing users’ flow, businesses can identify popular pathways, points of entry, and potential drop-off points within their digital platforms.
User Flow Example
In a Google Analytics 4 (GA4) user flow diagram, consider an e-commerce website selling clothing. The user flow starts when customers arrive at the homepage, and categories such as men’s, women’s, and kids’ clothing are presented. From there, users may navigate to specific product pages or browse through featured items.
For instance, users might click on the “Women’s Clothing” category, leading them to a page showcasing dresses, tops, and pants. From here, they might narrow their search by selecting the Dresses category and then clicking on a specific dress product page to view details and images.
After browsing, the user adds the desired dress to their shopping cart and proceeds to checkout. During checkout, they provide shipping information, select a payment method, and confirm their purchase. Finally, they are directed to a thank-you page or order confirmation screen after completing the transaction.
Analyzing this user flow diagram in GA4 allows businesses to identify common pathways leading to conversions and potential bottlenecks where users drop off. Businesses can enhance conversion rates and drive revenue growth by optimizing the user experience at critical touchpoints, such as product selection and checkout.
Sankey Diagram Example
In a Sankey diagram illustrating customer segmentation and churn analysis, let’s examine the makeup of customers categorized into different stages: newly acquired, healthy, at-risk, and churning.
At the beginning of the customer lifecycle, newly acquired customers enter the system through various acquisition channels such as social media, search engines, or referral programs. These customers represent the influx of new business and potential growth opportunities for the company.
As these newly acquired customers engage with the company’s products or services, they transition into the healthy segment. These customers demonstrate positive behaviors such as frequent purchases, active engagement, and high satisfaction. They contribute to the company’s revenue stream and will likely become loyal advocates.
However, not all customers remain in the healthy segment indefinitely. Some may exhibit signs of being at-risk due to declining engagement, decreased purchase frequency, or dissatisfaction with the product or service. Businesses must identify and intervene with these at-risk customers through targeted retention strategies to prevent them from churning.
Despite efforts to retain customers, some may ultimately churn, indicating the loss of their business. Churning customers exit the system and cease their relationship with the company, whether due to competitor offerings, changing preferences, or dissatisfaction. Understanding the reasons for churn and the factors contributing to customer attrition is critical for mitigating losses and fostering long-term customer loyalty.
While user flow diagrams focus on visualizing the paths users take through digital interfaces, Sankey diagrams depict the flow of resources or energy within complex systems. Analyzing this Sankey diagram enables businesses to visualize the customer lifecycle, identify key transition points, and implement proactive measures to retain customers and reduce churn rates. Businesses can optimize customer lifetime value and sustainably grow their revenue by effectively managing customer relationships across different stages.
Elements of a Sankey Diagram

- Nodes: Nodes in a Sankey diagram represent the sources, intermediaries, and destinations of the flows within a system. These can be processes, departments, or stages in a process. Each node has a distinct position within the diagram, indicating its role in the flow of resources, energy, or data.
- Links: Links in a Sankey diagram depict the flow of quantities (e.g., resources, energy, customers) between nodes. The width of the links is proportional to the quantity being transferred, visually emphasizing the magnitude of the flow. These links clearly visualize how resources move through the system from one node to another.
- Direction: The flow direction in a Sankey diagram indicates the movement of resources or entities within the system. Typically, flows are depicted from left to right or top to bottom, depending on the diagram’s layout. This directional aspect helps users understand the sequence of processes or stages involved in the system.
- Color: Color is often used in Sankey diagrams to differentiate between different types of flows or categories. Users can easily identify system patterns, trends, or anomalies by assigning distinct colors to specific nodes or links. For example, different colors may represent product categories, customer segments, or process stages.
- Value: The value associated with each flow quantifies the quantity being transferred between nodes. This value is usually displayed as a label on the links, providing users with precise information about the magnitude of the flow. By visually representing flow quantities, users can assess the significance of each pathway or process within the system.
- Arc: Besides the elements above, some Sankey diagrams may include arcs and curved segments connecting nodes or links. Arcs can be used to emphasize specific pathways or connections within the diagram, providing a visual hierarchy of flows. They add flexibility to the layout and design of the diagram, allowing for more nuanced representations of complex systems. Arcs can also enhance the aesthetic appeal of the diagram, making it more engaging and intuitive for users to interpret.
Online Tools for Building Sankey Diagrams
While we utilize Tableau to visualize our Sankey Diagrams of the customer base, that tool is not readily available to small or even mid-size businesses. Here are some resources online where you can build Sankey diagrams. Most have APIs that you can also incorporate into your site or application.
- D3.js – Sankey Plugin
- Google Charts Sankey Diagram
- Highcharts
- Plotly – Sankey Diagram in Python
- SankeyMATIC
The Sankey diagram is a versatile and insightful tool for businesses and owners to visualize and analyze various aspects of their operations. By leveraging Sankey diagrams in sales and marketing, companies can better understand their customers, optimize resource allocation, and make data-driven decisions to improve their bottom line. With the abundance of online resources available, creating Sankey diagrams has become more accessible than ever, empowering businesses to unlock valuable insights and drive growth.