How to Migrate Universal Analytics Data to Google Analytics 4
Universal Analytics shut down on July 1, 2023, and if you haven't saved your historical data by now, you need to act fast before it's gone for good. The challenge is that you can’t just import your old Universal Analytics (UA) history directly into Google Analytics 4. This article will guide you through the practical and effective ways to export, preserve, and still use your valuable historical website data.
Why You Can't "Import" UA Data into GA4
The first thing to understand is why there’s no direct import/export button between the two platforms. It’s because UA and GA4 are built on fundamentally different measurement models, like comparing apples and oranges.
- Universal Analytics used a session-based model. It grouped all user interactions (pageviews, events, transactions) into a "session." Many of its core metrics, like bounce rate and pages per session, were based on this container.
- Google Analytics 4 uses an event-based model. Everything is an event. A pageview is an event, a button click is an event, an add-to-cart is an event, and a session start is an event. This model is more flexible and user-centric, but it’s completely incompatible with UA’s session-based structure.
Because of this core difference, you can't push your old session-based data into the new event-based GA4 interface. So, when we talk about "migrating" historical data, what we really mean is archiving it outside of Google Analytics so you can access it for future analysis and year-over-year comparisons.
Step-by-Step: How to Export Your Universal Analytics Data
Your goal is to get your most important historical data out of the UA interface and into a format you control, like a CSV file, Google Sheet, or a database. Here are the most common methods, ranging from simple to more advanced.
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.
Method 1: Manual Exports (For Quick-and-Dirty Archiving)
This is the simplest method and works well if you only need a few key reports with a limited amount of data. It involves going into your most-used reports one by one and exporting them.
When to use this method:
- You only need high-level, aggregate data from a handful of specific reports (e.g., monthly channel traffic).
- You are not concerned about data sampling, which can occur on reports with high traffic.
How to do it:
- Log in to your Universal Analytics property.
- Navigate to a report you want to save, like Acquisition > All Traffic > Channels.
- Set the date range to the entire period you want to archive (e.g., Jan 1, 2021, to June 30, 2023).
- At the bottom-right of the report, increase the "Show rows" number to display as much data as possible on one page.
- At the top-right corner of the report, find the "Export" button.
- Choose your preferred format: Google Sheets, Excel (XLSX), or CSV.
Repeat this process for every crucial report, like Top Landing Pages, Audience Demographics, and E-commerce Transactions. While easy, this method is tedious and not scalable for preserving a complete data history.
Method 2: Using the Google Analytics Spreadsheet Add-on (The Recommended Method for Most Users)
This is the gold standard for most marketers and business owners. It's a free add-on for Google Sheets that connects to the Google Analytics API, allowing you to pull large amounts of data directly into a spreadsheet without having to export reports one by one. Crucially, it helps you work around data sampling.
When to use this method:
- You want to archive granular data for specific dimensions and metrics.
- You need to export more data than the manual method allows.
- You want an automated or semi-automated way to pull data monthly if needed.
How to do it:
- Install the Add-on: Open a new Google Sheet. Go to Extensions > Add-ons > Get add-ons. Search for "Google Analytics" and install the official add-on by Google.
- Create a New Report: Once installed, go to Extensions > Google Analytics > Create new report. A sidebar will appear on the right.
- Configure Your Report:
- Run the Report: Click "Create Report." A new tab called "Report Configuration" will appear. You can specify a date range here (e.g., "2022-01-01" to "2022-12-31").
- Execute: Go to Extensions > Google Analytics > Run reports. The add-on will now pull all the specified data into a new tab in your spreadsheet, neatly organized.
Pro Tip to Avoid Sampling: If you have a high-traffic site, GA might sample your data. To get accurate numbers, break your query into smaller date chunks. Instead of pulling two years of data at once, create and run a separate report for each month. It's more setup, but your data will be far more reliable.
Method 3: Using the Google Analytics Reporting API and a Custom Script (For Advanced Users)
If you're comfortable with code (or know someone who is), you can use the Google Analytics Reporting API directly. This provides the most flexibility and power, allowing you to pull massive, completely unsampled datasets and send them wherever you want (like a database or data warehouse).
When to use this method:
- You need to extract a very large and complex dataset.
- You want full control over data extraction and destination.
- You require an automated script to run regularly without manual intervention.
You can use languages like Python or R to write scripts that call the API, paginate through results to avoid sampling, and process the data as it's extracted. This is beyond the scope of a standard tutorial, but if you have a developer on your team, point them toward the GA Reporting API v4 documentation. It's the most robust way to archive your entire UA history.
Storing and Visualizing Your Archived UA Data
Having a dozen CSV files in a folder isn't very useful. The final step is to store and visualize your archived data so you can actually compare it to your new GA4 data.
1. Store Your Data
For most uses, keeping your exported Google Sheets or CSVs in a well-organized Google Drive folder is perfectly fine. If you have a massive dataset exported via the API, a better solution might be uploading it to a cloud storage service like Google Cloud Storage or a data warehouse like Google BigQuery. BigQuery is powerful because it lets you easily query and combine huge datasets later on.
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.
2. Visualize and Blend Your Data
This is where your archived data becomes valuable. By visualizing it next to your live GA4 data, you can create reports that bridge the gap and allow for true year-over-year analysis.
The best free tool for this is Looker Studio (formerly Google Data Studio).
Example: Building a Year-over-Year Traffic Report
- Connect Your Data Sources: In a new Looker Studio report, add two data sources:
- Blend the Data: This is the key step. Select both data sources on your report canvas, right-click, and choose "Blend data." Set a common "join key" between them, such as the month. This creates a new, unified data source.
- Create Your Chart: Now you can create a time-series line chart. Use the blended data source. Select "Month" as your dimension. For your metrics, select "Sessions" from your old UA Google Sheet and "Sessions" from your new GA4 connector.
You will now have a single chart showing a continuous trend of website traffic from your old UA data right through to today’s data from GA4. You can do the same for conversions, user behavior, and hundreds of other metrics.
Final Thoughts
Migrating your historical Universal Analytics data isn't a simple one-click process. It's about a strategic archival of your most important reports by exporting them to a format you control, like Google Sheets, and then using a visualization tool like Looker Studio to create blended reports for historical comparisons. It takes some upfront work, but preserving this context is essential for making smart, data-informed decisions in the future.
As you may have noticed, this process involves a lot of manual steps - connecting spreadsheets, setting up data sources, blending them to work together, and building reports from scratch. That's actually why we created Graphed. We automate that entire headache. You can connect your live GA4 data right alongside a Google Sheet containing your old UA exports. Then, instead of building reports manually, you just ask a question like, “Show my website sessions month-over-month for the past two years using my UA sheet for old data and my live GA4 connection for new data.” Graphed automatically generates the blended, interactive dashboard for you in seconds.
Related Articles
Facebook Ads For Personal Trainers: The Complete 2026 Strategy Guide
Learn how to effectively use Facebook ads for personal trainers in 2026. This comprehensive guide covers targeting strategies, ad creative, budgeting, and optimization techniques to help you grow your training business.
Facebook Ads for HVAC Companies: The Complete 2026 Strategy Guide
Learn how to run high-converting Facebook ads for HVAC companies in 2026. This guide covers targeting, creative strategies, and proven campaigns that drive real leads.
Facebook Ads for Florists: The Complete 2026 Strategy Guide
Learn proven Facebook advertising strategies for florists in 2026. Target the right audience, create compelling visuals, and optimize your ad budget for maximum ROI.