{"id":5742,"date":"2023-09-13T00:12:51","date_gmt":"2023-09-12T21:12:51","guid":{"rendered":"https:\/\/trackingchef.com\/?p=5742"},"modified":"2023-09-14T11:02:39","modified_gmt":"2023-09-14T08:02:39","slug":"exporting-google-analytics-ua-data-to-google-sheets","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-analytics\/exporting-google-analytics-ua-data-to-google-sheets\/","title":{"rendered":"Exporting Google Analytics UA data to Google Sheets"},"content":{"rendered":"\n
With the sunset of Google Analytic Universal (aka UA), many sites not only had to migrate their tracking to GA4 but also are now dealing with exporting the data from their legacy accounts.<\/p>\n\n\n\n
Google has stated that the data in legacy accounts will be retained for another year (July 2024), so marketers need to find a solution for exporting their important data ahead of that.<\/p>\n\n\n\n
In this guide, I’ll walk you through one option for retaining your data using Google Sheets and the Google Analytics Add-on for Google Sheets.<\/p>\n\n\n\n
Exporting the GA UA data is important. That being said, not all the data we have in GA counts. We don’t want to export data that is too old or too granular. How old is too old and how granular is too granular? That’s up to you to decide.<\/p>\n\n\n\n
Additionally, there are fancier ways to pull the data. You can plug into BigQuery or any other database to run fancy SQL on top.<\/p>\n\n\n\n
I believe most businesses won’t need this and can settle for a quick manual export that will retain the key data points they need to understand year-over-year trends.<\/p>\n\n\n\n
My suggestion is to do this manual export once (will take ~2 hours probably), using free tools such as Google Sheets, the Google Analytics Add-on for Sheets, and Looker Studio.<\/p>\n\n\n\n
Before we dive into the technical details, we need to understand what data we want to pull from GA.<\/p>\n\n\n\n
In Universal Analytics, the data is aggregated in tables, so the data structure is set in advance, for better or worse.<\/p>\n\n\n\n
This means that we can only pull a certain level of granularity of the data. For example, any data fetched will be aggregated within a specific date range – a day, week, or month.<\/p>\n\n\n\n
The data is formatted in the classic GA UA schema with Dimensions and Metrics.<\/p>\n\n\n\n
Classic combinations for exporting are usually:<\/p>\n\n\n\n Important – Add the date dimension so you can later reference a specific day in your dashboard.<\/p>\n\n\n\n To start the export, create a new Google Sheet (you can do this by navigating to sheets.new<\/a>).<\/p>\n\n\n\n In the new sheet, click on Extensions -> Add-ons -> Get add-ons<\/p>\n\n\n\n Search for Google Analytics<\/em> and add the pone on the top left-hand side (see screenshot).<\/p>\n\n\n\nDimensions<\/strong><\/td> Metrics<\/strong><\/td><\/tr> Source\/Medium, Campaign, Landing page<\/td> Users, Sessions, Avg. Time on site, Conversions (all or specific)<\/td><\/tr> Page path<\/td> Pageviews, Unique Pageviews, Avg. Time on page<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n Step 2: Create a new Google Sheet and install the add-on<\/h2>\n\n\n\n