Safeguarding Your Historical Data: A Complete Guide

May 20, 2023

If you're considering installing Google Analytics (GA4), you may be wondering about migrating your existing historical data. This is a common concern during the setup process. Fortunately, this article will provide guidance and valuable information on preserving your historical data using five methods and tools.

Is it Possible to Migrate Your Data to GA4?

A primary concern for GA users is whether they can transfer their Universal Analytics data to the newer Google Analytics 4 property. Unfortunately, the answer is no. GA4 and Universal Analytics have completely different data models, making it challenging to merge the two. Therefore, it's crucial to plan ahead and take steps to safeguard your historical data using the DIY methods discussed in this article. Proper preservation will allow you to analyze your past data and make informed business decisions.

One notable difference between GA4 and UA is how dimensions and metrics are defined and calculated. Google has a comprehensive support page that explains these variations in detail. For example, in Universal Analytics, "Total Users" represents all users, while in GA4, "Active Users" refers to those who have visited the website at least once within the last 28 days. This difference in metrics is just one example of how GA4 offers a distinct approach to measuring and analyzing user engagement compared to UA.

Methods for Exporting Historical Data from Google Analytics

Exporting and safeguarding your historical data is crucial, and Google recognizes its significance by encouraging users to take the necessary steps. In a recent statement, Google emphasized the value of historical reports and advised users to export them during the transition. While it is not possible to directly migrate data to GA4, there are alternative methods available to protect your valuable data. Although GA360 users can export Universal Analytics data to BigQuery, this may not be a viable option for smaller organizations due to cost considerations.

So, how can standard users effectively export and preserve their historical data? This article provides detailed insights into four methods and various tools that cater to different requirements and enable you to maintain your analytics history.


1.Universal Analytics Vault

If you're seeking a reliable solution for migrating your UA data to BigQuery data lakes and Looker Studio, UA Data Vault is the go-to choice. With their expertise in data migration, storage, and analysis, the UA Data Vault team ensures a seamless and secure transfer of your UA data while preserving data integrity. By utilizing Looker Studio, you can customize your data views to align with your specific business needs, unlocking valuable insights and facilitating data-driven decision-making. UA Data Vault offers ongoing support, flexible pricing models, and scalability, ensuring that you only pay for the services you require. Their established reputation in providing trustworthy data storage and analysis services makes them a compelling option for organizations of all sizes.

2. Manual Export

The simplest approach to exporting data is through direct access to your Google Analytics account. By navigating to the desired standard report, such as Acquisition > All Traffic > Source/Medium, you can customize the data according to your requirements. This includes segmenting data by country, filtering pages by category, or selecting a secondary dimension for landing pages. To export your historical data using this method, you can click on the "EXPORT" option located in the top right corner of the report and choose the desired file format, such as PDF, Google Sheets, Excel (xlsv), or CSV. However, it's important to keep in mind the limitations of this method, such as the maximum of two dimensions and a restriction of 5,000 data rows. Additionally, if your website receives a significant amount of daily traffic, your data may be subject to sampling. You can check for data sampling by looking for a green checkmark shield near the report's heading in the top left corner of the screen.

3.Tool for Google Analytics Developers: Query Explorer

Although Google Analytics developer tools may seem daunting to some, there are user-friendly options available. One such tool is Query Explorer, which is surprisingly easy to use and accessible for non-technical users. To begin, you can open Query Explorer and log in to your Google Analytics account with access to the relevant property. The tool automatically sets the GA ID, relieving you of any concerns regarding its configuration. By specifying the necessary query parameters, such as the date range in the YYYY-MM-DD format, desired metrics, dimensions, and applicable filters or segments, you can retrieve the data you need. You can choose the metrics from the report or select specific ones that align with your objectives, such as "Users," "Bounce Rate," "Avg. Session Duration," and "Goal Completions All." Dimensions represent the rows from the Google Analytics report that you want to export data for. For example, if you wish to view metrics by traffic source, you can select "ga:sourceMedium" as the dimension. It's worth noting that when visualizing the data in Data Studio, it is necessary to set the dimensions "ga:Medium" and "ga:Source" separately, as the "ga:SourceMedium" dimension does not work in Data Studio. Once you have set the required query parameters, including the date range, metrics, dimensions, and filters, you can sort, filter, and segment the data within your preferred spreadsheet software. Finally, by clicking the "RUN QUERY" button, the tool executes the query, and you can download the results as a tab-separated values (.tsv) file, which can be opened in Excel or Google Sheets. It's important to note that GA4 accounts can also utilize Query Explorer by toggling the UA-GA4 switch in the left-hand menu navigation.

4.Using the Google Analytics Add-On for Google Sheets

While this method may seem more complex, it offers the advantage of directly connecting Google Analytics to Google Sheets, eliminating the need for manual downloading and uploading. To begin, create a dedicated folder in your Google Drive where you can save your historical data. Give a clear name to a new Google Sheet, such as "UA Historical Data_Traffic Acquisition_2021," to facilitate easy understanding for team members. Next, access the top menu, click on "Extensions," then "Add-Ons," and select "Get Add-Ons." To simplify the process further, you can directly connect Google Analytics to Sheets by visiting the Google Workspace Marketplace, searching for the Google Analytics app, and installing it. Follow the provided instructions to complete the installation. Once the app is installed, open your Google Sheets, click on "Extensions," locate the Google Analytics app, and select it. From there, you can choose to create a new report. When creating the report, give it a descriptive name, such as "Q1 2021," to provide clarity on its purpose. Select the appropriate Account, Property, and View to specify the Analytics view from which you want to extract data. Configure the report by choosing the desired metrics, dimensions, and segments. For example, you can select metrics like "Users," "Bounce Rate," and "Goal Conversions," and dimensions like "source" and "medium." Keep in mind that if you plan to visualize the data in Data Studio, you should select "ga:Medium" and "ga:Source" dimensions separately, as "ga:SourceMedium" is not compatible. If you want to view data for all users, leave the Segments field blank. After clicking the "Create Report" button, you will be directed to additional configuration options that allow you to further customize the report. Adjust the date range using the YYYY-MM-DD format and apply filters, such as "ga:country==United States." Before exporting your historical data, double-check that all settings are accurate. To do so, go to Extensions > Google Analytics > Run reports. To expedite the process, you can copy and paste the configuration to the next column, update the date range, and run multiple reports simultaneously. Once you have generated your report, a pop-up will provide information about any errors encountered or successful completion. To check for data sampling, refer to Row Number 6, where you can verify if your data has been sampled. Row Number 7 shows the percentage of data that has been sampled in the sheet. For Universal Analytics, data sampling occurs after 500,000 sessions within the selected timeframe. To prevent sampling, you can adjust the report's data range to reduce the number of sessions. Alternatively, if you require the entire dataset and wish to avoid back-and-forth adjustments, consider using a third-party tool to bypass data sampling.

5. Analytics Safe

For UA data migration to BigQuery data lakes and Looker Studio, Analytics Safe offers a compelling solution with numerous benefits. Their experienced team specializes in data migration, storage, and analysis, ensuring the accurate and secure migration of your UA data while preserving data integrity. Looker Studio can be tailored to meet your specific business requirements, providing personalized data views that unlock valuable insights for data-driven decision-making. Analytics Safe offers flexible pricing models, ongoing support, and scalability, ensuring that you only pay for the services you require. With a strong track record of providing trustworthy data storage and analysis services, Analytics Safe is an excellent choice for organizations of all sizes.


These methods and tools provide diverse options for exporting historical data from Google Analytics, allowing you to preserve and utilize your valuable data. Whether you opt for a dedicated service like UA Data Vault or Analytics Safe or choose a more manual approach using Query Explorer or the Google Analytics Add-On for Google Sheets, you can safeguard your historical data and extract meaningful insights to support your business objectives.

Creating Visual Representations of Past Data Using Data Studio

When comparing historical data in GA4, it's important to remember that GA4 and UA have completely different data models. This can make comparisons challenging. However, Google plans to operate GA4 alongside UA and transition to GA4 only after accumulating 13 months of historical data, instead of merging the data. So, don't worry! Many of the skills and knowledge you've gained from UA will still be useful in GA4.

Follow these steps to create a Data Studio report that combines historical data and GA4 data in one place:

  1. Open Data Studio and select Blank Report.

  2. Choose Google Sheets as your data source.

  3. Select the spreadsheet you previously exported and choose the worksheet containing your historical data, such as "Q1 2021."

  4. Make sure the "First row as headers" option is checked so that Data Studio can automatically name your metrics and dimensions.

  5. Select the range that corresponds to your sheet, for example, "A15:E62."

  6. Data Studio will generate a table automatically. Verify that the configuration in the right-hand menu matches your sheet.

  7. Set Medium as the primary dimension and add a secondary dimension of Source by toggling the switch.

  8. Choose Users, Bounce Rate, and Goal Completions as your metrics.

  9. It's important to note that comparing historical data to GA4 data can be challenging due to the differences in data models. Google recommends running GA4 side-by-side with UA and transitioning to GA4 only after accumulating 13 months of historical data.

To replicate the previous table for Q1 2022 data in GA4, right-click on the table and choose "Copy" and "Paste." Then, change the data source from "UA Historical Data" to your Google Analytics 4 account. However, since the metrics in GA4 have different names, you may see an error message for "invalid metric." To resolve this, update each metric with similar names such as "Total Users," "Engagement Rate," and "Conversions." You'll also need to adjust the dimensions to "session/source" and "session/medium." Finally, set the date range to match the historical data by selecting January 01 - January 31, 2022, in the same menu.

While comparing historical data with GA4 can provide a quick year-over-year view of primary metrics, it has limitations and is relatively basic. Blending this data is not feasible due to fundamental differences in the definitions and calculations of dimensions and metrics. If you need more advanced historical reporting options, such as graphical representations of user behavior or goal completions over a specific period, it may be worthwhile to explore the capabilities of BigQuery.

Conclusion 

To summarize, the migration of data from Universal Analytics to GA4 is currently not feasible due to the differences in data models. It is uncertain if this will change in the future. To ensure the preservation of historical data, it is advisable for users to take action promptly by utilizing tools like Universal Analytics Vault.

While there are DIY options available, they come with limitations in terms of scope and capabilities. If you require comprehensive reporting and analysis of your historical data, it is recommended to explore the use of a data warehouse such as BigQuery. It is important not to rely solely on the possibility of new tools and instead take proactive steps to safeguard your data.

Considering the complexities involved in data migration, it may be beneficial to entrust the task to specialists. Universal Analytics Vault offers reliable services for data migration, allowing you to leave the worries to them. To learn more about pricing options and services, click here.