How to Make a Sankey Diagram in Looker with AI
Sankey diagrams are one of the most powerful ways to visualize the flow of users, customers, or revenue from one point to another. Instead of just seeing simple "before and after" numbers, you can map out the entire journey. This article will show you how to prepare your data and build a compelling Sankey diagram right within Google's Looker Studio, highlighting how AI-driven thinking can simplify the most challenging part of the process - getting your data right.
What is a Sankey Diagram and Why Should You Bother?
At its core, a Sankey diagram shows flow. It uses nodes (the starting and ending points) and links (the paths between them) to illustrate movement. The width of each link is proportional to the flow quantity, so you can see at a glance which paths are most important.
Imagine you want to understand how users navigate your website. A standard bar chart might show you your top landing pages and your top exit pages, but it won’t connect them. You’re missing the story in the middle. The Sankey diagram fills that gap.
Here are a few practical examples that marketers and business owners can relate to:
Visualizing Website User Journeys: See the exact paths users take after landing on your homepage. Do they go to your pricing page, a product page, or your blog? A Sankey diagram makes this "from-to" relationship incredibly clear.
Mapping Marketing Campaign Funnels: Trace how users from different sources (Google Ads, Facebook, Organic Search) move through your funnel. You can identify which channels are best at driving users to high-value pages like a checkout or a demo request form.
Tracking Sales Pipeline Stages: For sales teams, a Sankey can visualize the flow of leads through the sales pipeline. How many "New Leads" become "Qualified Leads," and how many of those convert to "Closed-Won" deals versus "Closed-Lost"? You can instantly spot leaks in your pipeline.
The Hardest Part: Preparing Your Data for a Sankey
Here's the often-overlooked secret to any great data visualization: your chart is only as good as the data you feed it. Looker Studio needs your data structured in a very specific way to build a Sankey diagram. It requires at least three components:
The Source: The starting point of the flow (e.g., "Homepage", "Paid Search").
The Destination: The next step in the flow (e.g., "Pricing Page", "Contact Us").
The Weight: A number that defines the size of the flow (e.g., number of sessions, users, or dollars).
Getting your data into this "Source > Destination > Weight" format is where most people get stuck. It’s rarely available in a clean, one-click report from tools like Google Analytics.
The Manual "Old School" Method
Traditionally, preparing this data is a completely manual grind:
You log into Google Analytics 4.
You find the "Path exploration" report.
You try to constrain the data to just the first two or three steps to keep it manageable.
You export the data as a CSV or into Google Sheets.
You spend the next hour cleaning, filtering, and restructuring the columns into the three tidy columns: Source, Destination, and Weight.
You finally upload that file into Looker Studio.
If you need to update the report next week, you have to do it all over again. It's time-consuming, frustrating, and prone to human error.
Using an "AI Mindset" to Simplify Data Prep
This is where thinking differently about data is a game-changer. Modern AI-powered analytics tools work by turning simple, plain-English questions into data-ready outputs. You don’t need to know the name of every metric or dimension, you just describe what you want to see.
Imagine being able to just ask your data: "Show me the top 10 user paths from our homepage to the next page for last month, and count the number of sessions for each path."
An AI data analyst can understand this request, grab the right data from Google Analytics, structure it perfectly into 'Source' (Homepage), 'Destination' (the next page), and 'Weight' (sessions), and give you a table that's ready to go. The manual wrangling disappears. While Looker Studio itself isn't fully conversational for this specific task, adopting this "ask, don't build" mindset is the key to speeding up your entire reporting workflow.
Step-by-Step: How to Make a Sankey Diagram in Looker Studio
Once your data is properly structured (Source, Destination, Weight), building the Sankey diagram in Looker Studio is surprisingly straightforward. Let's walk through it using a website traffic example where our data is in a Google Sheet.
Step 1: Connect Your Data Source
Start by opening a new, blank Looker Studio report.
In the "Add data to report" window, select "Google Sheets" (or whichever connector your data is in, like BigQuery or MySQL).
Authorize the connection to your Google account if you haven't already.
Find and select the spreadsheet containing your prepared data. Choose the correct worksheet and click Add. You’ll see a notification that you're about to add this data source to your report.
Step 2: Add a Sankey Chart to your Report Canvas
With your data source connected, you'll see a blank canvas for your report.
Go to the main menu and click on "Add a chart."
Scroll down until you find the "Tree" category. You should see an option for a "Sankey" chart.
Click it, and then click anywhere on your report canvas to place the new chart.
You’ll see a placeholder Sankey diagram appear. It’s probably not what you want yet because Looker Studio takes its best guess at which fields to use. Now we need to configure it correctly.
Step 3: Configure the Chart’s Dimensions and Metric
This is the most important step. With your new Sankey chart selected, look at the Setup panel on the right-hand side. This is where you tell Looker Studio how to build the visual.
Dimension (Source): Click on the first dimension field. From your list of available fields, drag and drop the column from your data that represents your 'Source'. For our website traffic example, this might be named "Previous Page Path".
Dimension (Destination): Click on the second dimension field and select the column that represents your 'Destination'. This would be our "Current Page Path" field.
Metric (Weight): Under the Metrics section, drag and drop the field that represents your flow 'Weight'. In our case, this would be "Sessions" or "Users".
As you assign these fields, your Sankey diagram will instantly update to reflect your data structure. You'll see the flows correctly moving from your source dimension to your destination dimension, with the link sizes reflecting your chosen metric.
Step 4: Customize Your Chart for Clarity
A default Sankey diagram can sometimes feel a bit cluttered. Use the Style tab in the right-hand panel to clean it up and make it easier to read.
Nodes: Here, you can change the color of the nodes and decide how many nodes to display before grouping the rest as "Other". This is super helpful if your diagram is too busy.
Links: You can change the color scheme for the flow links to match your branding. Adjusting the color "by source node" or "to destination nodes" helps visually differentiate paths.
Labels: You can adjust the font color, size, and family of the labels to improve readability.
These style controls allow you to turn your chart from a generic output into a clear and polished visual that's ready to be shared with your team or clients.
Interpreting Your Sankey Diagram: Finding the Insights
A diagram is only valuable if you know how to read it. Here are some things to look for when analyzing a Sankey chart:
Identify the "Highways": Look for the thickest links. These are the most common paths your users are taking. Are these the paths you expected to see? If a path you expect to be popular (like your homepage to a pricing page) isn’t, you may discover a potential friction point.
Spot Major Drop-Off Points: Look for rows that go into narrow flows or even stop. If you see a large number of users landing on your homepage, but only a tiny fraction actually move on to a product page, that’s a signal that you need to re-evaluate how your homepage is guiding users.
Discover the Unexpected: Sometimes, a Sankey reveals completely unexpected paths. Maybe you find that users are navigating from one specific blog post directly to your pricing page. This is an insight that might lead you to create a new, more targeted call-to-action on that blog post.
Common Pitfalls and How to Avoid Them
Creating a Sankey diagram can be satisfying, but there are a few common pitfalls to watch out for:
Data Overload: By trying to visualize hundreds of possible paths in a single diagram, your chart will become cluttered and impossible to read. Filter your dataset to show only the most meaningful paths for clearer insights.
Incorrect Structure: If your source and destination fields are not correctly mapped in the dataset itself, your chart will not make sense. Always double-check that your data is in that required Source > Destination > Weight format.
Misinterpreting the Flow: A Sankey diagram shows connections (users or traffic) from point A to B. Just because a path is popular, doesn’t mean it’s the most meaningful for your insight efforts. Combine Sankey insights with qualitative data to get the full picture.
Final Thoughts
Sankey diagrams are incredibly useful for visualizing flows in user journeys, marketing funnels, or sales pipelines. Looker Studio provides the tools to build the chart, but the real transformation comes from understanding the data that sits behind it. While it might seem hard at first, the payoff is worth it in the insights you can gain.
We at Graphed, aim to eliminate the manual data grinding. Instead of spending hours sifting through CSVs or figuring out which tool feels best, simply ask, "Show me a Sankey diagram overview of X from last quarter," and have a beautifully interactive dashboard without the distractions. Turning data preparation from an hourly chore into seamless conversations enables you to more easily act on your insights.