Historical Data Migration
The Ultimate Guide to Safeguarding Your Historical Data
Preparing for the July 2023 deadline is crucial as it is currently not possible to migrate your data to GA4. However, there are alternative options available to help you get ready.
Apr 25, 2023
If you're getting ready to install Google Analytics (GA4), you may wonder about the most efficient way to move your existing historical data. This is a common question that arises during the setup process. Fortunately, this article will address this issue and provide you with valuable information on whether you can merge data in GA4, as well as four techniques to safeguard your historical data.
Is it Possible to Transfer Your Data to GA4?
One of the key concerns among GA users is whether they can transfer or migrate their Universal Analytics data to the newer Google Analytics 4 property. Unfortunately, the answer is no. You cannot transfer or migrate your data to GA4, and it's unlikely that this feature will be added anytime soon.
This is because GA4 and Universal Analytics use entirely different data models, which makes it difficult to merge the two. Therefore, it's essential to plan ahead and take steps to preserve your historical data using the DIY methods discussed in this article. With proper preservation, you can still analyze your past data and make informed decisions for your business.
One significant difference between GA4 and UA is the way dimensions and metrics are defined and calculated. Google offers a comprehensive support page that covers many of these variations in detail. For instance, let's consider one of the most frequently used KPIs, "Users."
In Universal Analytics, "Total Users" refers to all users, while in GA4, "Active Users" pertains to those who have visited the website at least once within the last 28 days. This change in metrics is just one example of how GA4 offers a different approach to measuring and analyzing user engagement compared to UA.
Comparing UA data with GA4 data would be akin to comparing apples to oranges, even if it were possible to migrate the former to the latter.
Exporting Historical Data from Google Analytics: Methods and Techniques
Google acknowledges the significance of users' historical data and encourages them to export it. In a recent statement, Google expressed, "We know your data is important to you, and we strongly encourage you to export your historical reports during this time." Google has also hinted that additional guidance on exporting may be provided in the future.
Although migration of data to GA4 is not possible, there are still ways to save your data. While GA360 (a paid product) users can export Universal Analytics data to BigQuery, its cost makes it unaffordable for smaller organizations.
So, what about standard users? How can they export their historical data?
In this article, we will share four methods and various tools that can handle more complex requests, allowing you to export your data and preserve your analytics history.
Opting for Analytics Safe to migrate your UA data to BigQuery data lakes and gain access to Looker Studio for data visualization and insights comes with several benefits. The team of experts at Analytics Safe has extensive experience in data migration, storage, and analysis, and they will work closely with you to ensure that your UA data is accurately migrated without any loss of data integrity. Looker Studio can be customized to meet your specific business requirements, providing a tailored view of your data that allows you to derive valuable insights and make data-driven decisions.
Additionally, Analytics Safe provides ongoing support to ensure that your data is always accessible and that you have the necessary resources and tools to analyze your data effectively. The pricing model is flexible and scalable, which means that you only pay for the services that you need. Furthermore, Analytics Safe has a proven track record of providing reliable and secure data storage and analysis services to businesses of all sizes. Begin your journey with Analytics Safe by clicking here
2. Manual Export
To export data, the simplest approach is to access your Google Analytics account directly. First, navigate to the standard report you wish to preserve, such as Acquisition > All Traffic > Source/Medium. Then, apply any customizations you require, such as segmenting data by country, filtering pages by category, or selecting a secondary dimension for landing pages.
To export your historical data using this method, simply click on the "EXPORT" option located in the top right corner of the report. Next, choose the desired file format from the drop-down menu, including PDF, Google Sheets, Excel (xlsv), or CSV.
However, there are a few limitations to be aware of when using this approach. For example, you can only apply up to two dimensions and are limited to a maximum of 5,000 rows of data. Additionally, if you receive a high volume of daily hits, your data may be sampled.
To check if your data is being sampled, look for the green checkmark shield located near the report's title in the top left corner of the screen. If the shield is present, your data is not being sampled.
3. Query Explorer: A Tool for Google Analytics Developers
You may find the Google Analytics dev tools intimidating due to their technical nature, but you're probably already familiar with one of them. The Campaign URL Builder is a common tool used to generate UTM parameters for campaigns. Another useful tool is Query Explorer, which is surprisingly simple and free to use, making it an excellent option for non-technical users. To get started, simply open Query Explorer and click on the orange "LOGIN" button.
Next, sign in to your Google Analytics account that has access to the property you want to work on. Then, choose the account, property, and view for which you want to save data. The tool will automatically set the GA ID, so there's no need to worry about that.
Specify the remaining query parameters in Query Explorer, including the date range in the YYYY-MM-DD format, desired metrics, dimensions, and any filters or segments you want to apply.
When selecting metrics, you can either choose all the metrics from the report or just a few that align with your goals, such as "Users," "Bounce Rate," "Avg. Session Duration," and "Goal Completions All."
Dimensions refer to the rows from the Google Analytics report that you want to export data. For instance, if you want to view metrics by traffic source, select "ga:sourceMedium" as the dimension.
Note that if you plan to visualize the data in Data Studio, you will need to set the dimensions "ga:Medium" and "ga:Source" separately, as "ga:SourceMedium" doesn't work in Data Studio. Further information on visualization will be provided later.
While the remaining query parameters are optional, it's recommended to leave them blank in this scenario to retrieve the maximum amount of data.
Once you have set all the query parameters, including the date range, metrics, dimensions, and filters, you can sort, filter, and segment the data within your spreadsheet software of choice.
Next, click on the "RUN QUERY" button located at the bottom of the Query Explorer page. Once the query is complete, you can download the data in the form of a tab-separated values (.tsv) file and open it in either Excel or Google Sheets.
It's important to note that you can access Query Explorer for GA4 accounts by toggling the UA-GA4 switch in the left-hand menu navigation.
4. Add-On for Google Sheets in Google Analytics
This approach may seem slightly more intricate, but it directly links Google Analytics to Sheets, removing the need for downloading and uploading.
To begin, establish a folder in your Google Drive to store your historical data. Next, create a new Google Sheet and name it something that will be clear to future team members, such as "UA Historical Data_Traffic Acquisition_2021."
Navigate to the top menu and select Extensions > Add-Ons > Get Add-Ons.
To avoid the extra steps of downloading and uploading, you can use a more complex but convenient option that connects Google Analytics directly to Sheets.
First, create a folder in your Google Drive where you can store your historical data. Then, create a new Google Sheet and give it a descriptive name such as "UA Historical Data_Traffic Acquisition_2021".
Next, navigate to the Google Workspace Marketplace and search for the Google Analytics app. Install the app and follow the onscreen instructions.
Once the app is installed, open your Google Sheets and click on Extensions. You should see the Google Analytics app listed. Click on it and then select "Create new report".
From here, you can proceed to export your historical data.
To export your historical data using the Google Analytics Sheets Add-On, follow these steps:
Step 1: Give your report a clear and meaningful name, such as "Q1 2021," so that your team members can easily understand its purpose.
Step 2: Choose the Analytics view from which you want to extract data by selecting the appropriate Account, Property, and View.
Step 3: Configure the report by selecting the metrics, dimensions, and segments you want to include. To keep it simple, you might choose metrics such as "Users," "Bounce Rate," and "Goal Conversions," and dimensions such as "source" and "medium." Keep in mind that if you plan to visualize this data in Data Studio, you should pull the traffic source dimensions separately as "ga: Medium" and "ga:Source," as "ga:sourceMedium" is not compatible.
To view data for all users, keep the Segments field blank.
After clicking the blue Create Report button, you will be directed to additional configuration options, offering more ways to customize the report beyond the previous screen.
You can adjust the date range using the YYYY-MM-DD format and apply filters such as ga:country==United States.
Make sure to verify that all settings are accurate before exporting your historical data. To do so, go to Extensions > Google Analytics > Run reports.
Note: You can expedite this process by copying and pasting the configuration to the next column, updating the date range, and running multiple reports simultaneously.
Once you've created your report, a pop-up will notify you of any errors or successful completion.
To check for data sampling, refer to Row Number 6. Row Number 7 will indicate the percentage of sampled data in the sheet.
For Universal Analytics, data sampling occurs after 500,000 sessions within the chosen timeframe. To avoid sampling, you can adjust the report data range to decrease the number of sessions.
Alternatively, if you require the entire dataset and want to bypass back-and-forth, consider using a third-party tool to avoid data sampling.
Visualizing Historical Data With Data Studio
After extracting your historical data, you may want to create a comparison that is easy to interpret in GA4. However, it is essential to note that comparing UA and GA4 data can be challenging since the data models are entirely different.
Google's plan is to run GA4 simultaneously with UA and move over to GA4 once it has accumulated 13 months of historical data, instead of merging the data. Rest assured that much of your acquired knowledge and skills will be transferable to GA4.
To create a Data Studio report that combines historical data and GA4 data in one place, follow these steps:
Open Data Studio and select Blank Report.
Choose Google Sheets as your data source.
Locate the spreadsheet you exported earlier and select the worksheet that contains your historical data, such as "Q1 2021."
Ensure that the "First row as headers" option is checked so that Data Studio can automatically name your metrics and dimensions.
Select the range that matches your sheet, for example, "A15:E62."
Data Studio will automatically generate a table. Check that the configuration in the right-hand menu matches your sheet.
Make Medium the primary dimension and add a secondary dimension of Source by toggling the switch.
Choose Users, Bounce Rate, and Goal Completions as your metrics.
Your historical data table should resemble the screenshot below. Keep in mind that comparing historical data to GA4 data may be difficult due to differences in data models.
Note: It's recommended by Google to run GA4 side-by-side with UA and, instead of merging the data, just cut over to GA4 as soon as it has 13 months of historical data.
We will now replicate the previous table but for the Q1 2022 data in GA4.
To do this, first, duplicate the table by right-clicking and selecting the "Copy" and "Paste" options. Then, change the data source from "UA Historical Data" to your Google Analytics 4 account.
Since the metrics have different names in GA4, you will encounter an error message for "invalid metric". To fix this, update each metric with similar names such as "Total Users," "Engagement Rate," and "Conversions."
Dimensions will also need to be updated to "session/source" and "session/medium".
Finally, adjust the date range to match the historical data by setting it to January 01 - January 31, 2022, in the same menu.
Comparing historical data with GA4 enables you to quickly observe primary metrics year over year. However, the comparison is relatively simple and lacks sophistication. Due to the fundamental differences in the definitions and calculations of dimensions and metrics, blending this data is not possible. If you require more comprehensive historical reporting options, such as graphical representations of user behavior or goal completions over a given period, it may be worthwhile to explore the capabilities of BigQuery.
While it may not be possible to migrate Universal Analytics data to GA4 directly, it is important to take steps to ensure the longevity of your historical data. Utilizing services like Analytics Safe can help preserve your data while also offering more comprehensive reporting capabilities. Click here to learn more about our pricing options and services.