How to Make a Sunburst Chart in Google Analytics with AI
A sunburst chart is one of the best ways to visualize hierarchical data, but Google Analytics doesn’t offer a built-in option to create one. These multi-layered charts are perfect for understanding how different segments of your traffic contribute to the whole, from overarching channels down to specific campaigns. This article will show you exactly how to build a sunburst chart for your Google Analytics data, skipping the tedious manual export and spreadsheet work by using a simpler, AI-powered approach.
What Exactly Is a Sunburst Chart?
Think of a sunburst chart as a next-level pie chart. While a standard pie chart shows parts of a whole, a sunburst chart shows parts of a whole and a whole lot more. It's built to display hierarchical data through a series of concentric rings.
- The Center Circle: This represents the root of your data, or the total value you're analyzing (e.g., "Total Users").
- The Outer Rings: Each subsequent ring moving outwards represents a deeper level of the hierarchy, broken down from the previous layer. The size of each slice corresponds to its share of the parent slice.
For a marketer analyzing Google Analytics data, this is incredibly powerful. You could visualize your traffic hierarchy like this:
- Center: 100,000 Total Sessions
- First Ring: Broken down by Default Channel Grouping (e.g., 40% Organic Search, 30% Paid Search, 20% Direct, 10% Social).
- Second Ring: Further breaks down each channel. The "Paid Search" slice could be subdivided into specific campaigns ("Winter Sale," "Brand Awareness," "Q2 Promo").
- Third Ring: Goes even deeper, breaking down the "Winter Sale" campaign into individual Ad Groups.
In one single visualization, you can see not only that Paid Search drives 30% of your traffic, but that a single campaign within that channel is responsible for half of that. This kind of proportional insight is much harder to grasp from a simple table or bar chart.
Why Google Analytics Can't Build a Sunburst Chart Natively
If they're so useful, why can't you just click a button in your Google Analytics dashboard to create one? The simple answer is that GA is primarily a data collection and standard reporting platform, not a dedicated data visualization tool.
GA excels at its core job: collecting detailed user data and presenting it through tables, line graphs, and basic bar charts. It’s designed to answer common questions quickly. But for advanced, custom visualizations like sunbursts, heatmaps, or Sankey diagrams, it just doesn't have the functionality. This isn't a knock on GA, it’s a limitation shared by most native reporting in SaaS apps. They give you the essential metrics but rely on external business intelligence tools for deeper, more custom visual analysis.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
The Old Way: The Manual Spreadsheet Struggle
Traditionally, if you wanted a sunburst chart from your GA data, you had to roll up your sleeves and prepare for a tedious, multi-step process. This method works, but it's slow, manual, and creates a static report that's outdated the moment you export it.
Here’s what that typically looks like:
Step 1: Get the Right Data from GA
First, you need to pull the hierarchical data you want to visualize. For our traffic source example, you would:
- Navigate to the Traffic acquisition report in Google Analytics.
- The primary dimension is already set to Session default channel group. Perfect for our first ring.
- Click the "+" button to add a secondary dimension, like Session campaign. This will be our second ring. You could even add a third, like Session source / medium.
Step 2: Export to a Spreadsheet
Once your table looks correct in GA, you'd click the "Share this report" icon in the top right and select "Download File" to export it as a CSV. You'll then open this file in Google Sheets or Microsoft Excel.
Step 3: Clean and Structure the Data
This is where the real work begins. The exported data is a flat file, not the parent-child structure a sunburst chart needs. You'll have to manually create columns for "Parent," "Child," and "Value" and organize the data. This involves spreadsheet functions, pivot tables, and a lot of patience to ensure every campaign is correctly nested under its channel grouping. It's easy to make mistakes here that skew your visualization.
Step 4: Build the Chart in Excel or Another Tool
If you're using a newer version of Excel, it has a built-in Sunburst chart option under "Insert > Hierarchy Chart." You select your structured data, insert the chart, and then spend more time formatting colors and labels. If you used Google Sheets, you'd need to find an add-on or another tool, adding even more steps.
The result is a single, static chart. If your team has follow-up questions or wants to see the data for a different date range, you have to start the entire process over again. A 10-minute question turns into a multi-hour report-building exercise.
The Modern Way: Instantly with an AI Data Analyst
Instead of wrestling with CSV exports and pivot tables, you can now connect your Google Analytics account to an AI-powered analytics tool and simply ask for a sunburst chart using plain English. This approach turns a frustrating, technical process into a simple conversation.
Here's how it works:
Step 1: Connect Your Google Analytics Account
Modern AI tools are built for speed. You start by connecting your data source - in this case, Google Analytics - through a simple, one-click authentication process. You log in with your Google account, select the GA property you want to analyze, and the connection is made. There are no APIs to manage or manual setups to configure.
Step 2: Describe the Sunburst Chart You Want
This is where the magic happens. Instead of clicking through menus and building tables, you just type a prompt describing the chart you need. The AI understands the structure of your GA data and generates the visualization for you in real-time.
For example, you could ask:
Create a sunburst chart of my sessions from GA for the last 90 days. Break it down by channel group, and then by campaign.
The system parses your request, queries your live Google Analytics data, and instantly builds a fully interactive sunburst chart. There's no export, no spreadsheet, no manual data structuring.
Step 3: Refine and Ask Follow-Up Questions
The biggest advantage here is interactivity. The chart isn't a static image, it's a live component of a dashboard. Saw an interesting trend? You can ask a follow-up question to dig deeper:
- "Filter this chart to show only mobile traffic."
- "What was the conversion rate for the 'Winter Sale' campaign slice?"
- "Show this as a treemap instead."
This transforms data analysis from a one-way report into a two-way conversation, allowing you to explore your data naturally and follow your curiosity to find powerful insights in seconds - not hours.
Sunburst Chart Examples & Prompts for Crossover Athletes
Here are a few practical use cases for sunburst charts with Google Analytics data, along with sample prompts you can use.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
1. Visualizing Marketing Channel Performance
Get a bird's-eye view of how all your marketing channels contribute to overall traffic, and which specific campaigns are the biggest drivers within each channel. Prompt:
Show me my website traffic by Session default channel group, then drill down into Session source / medium. Visualize it as a sunburst chart.
2. Understanding On-site User Behavior
Map out how users navigate your site. This simple analysis starts with device category and drills down into the most popular landing pages for each device. Prompt:
Build a sunburst chart of users by device category. For each category, show the top landing pages.
3. Analyzing Ecommerce Product Performance
If you have an ecommerce store running on a platform like Shopify, you can see which product categories drive the most revenue and which specific items are the top sellers in that category. Prompt:
Create a sunburst chart from my GA4 data for total revenue by Item category, then by Item name for last quarter.
4. Comparing Geographic Performance
Sunburst charts are also great for layered geographical data. Get an instant look at your top-performing countries, and then see the key regions or cities contributing within each one. Prompt:
Make a sunburst chart of all users. The first layer should be Continent, the second should be Country, and the third should be City.
Final Thoughts
Sunburst charts are a powerful way to understand the hierarchical patterns hidden in your Google Analytics data, letting you see the forest and the trees at the same time. While GA can't create them on its own and the manual spreadsheet method is incredibly time-consuming, you no longer have to be a data wizard to build one. AI now lets you go directly from question to visualization.
This is exactly the problem we built Graphed to solve. You can connect your Google Analytics account in seconds and use simple, conversational language to create sunburst charts and other custom dashboards. We want to help you spend your time acting on insights, not exporting data and fighting with pivot tables. Instead of the hours spent on manual reporting, you get the answers you need in a single sentence.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.