Google provides a very easy way to automatically import data from your Google Analytics reports to Google Spreadsheets. Once created the import you can schedule to requests, so there is no more work after that. The good thing about having Analytics data in Google Spreadsheets is that you can process the data in exactly the way you need them. This helps you especially when you have a huge amount of visits per day or in general a huge amount of data e.g. when you track several TLDs.
So here is how you import your data the easiest way.
First of all go to your Google drive account and create a new Sheet.
Go to Get Add-ons Tab and choose Google Analytics.
Congratulations, you just added the Google Analytics Add-on to your Google Drive account. Now again click on the Add-ons section. There should be a field called Google Analytics. Hover it and click on Create new report. On the left side of the screen opens a section where you can edit the content of your first report.
First of all choose a name for your report and write it in the first input field. When you use the same Google account in Google Drive like in your Google Analytics, all your Properties and Views will be available in the second section. In the third section you can write the Metrics and Dimensions. You donÂ´t have to fill out the third section right now in case you donÂ´t know the Metrics and Dimensions yet. Just click the Create Report button and your first report will be created. After you successfully created the report the new Report Creation sheet will pop up.
In case you have not filled out the Report Name in the first step, you have to do it now because it is not possible to generate a report without a name. The field Type describes the API that you request, so in this case the requests will be send to the Google Analytics Core API. DonÂ´t change this field! The next field is the View ID of the selected Analytics View. In case you want to work with another Analytics View you can check the View ID in the Analytics View Settings in the Admin area.
The next three rows are for the time period. You can either set a specific start and end date or get data of the last n days. Now comes the interesting stuff, Metrics, Dimensions and Filters. In case you never heard anything about the Metrics and Dimensions in Google Analytics, go to Dimensions & Metrics Explorer to find out more.
An easy example is the tracking of the sessions and the countries where users come from. Therefore you have to fill out the fields this way:
As you can see the in the Metrics field I wrote the sessions and in the Dimensions field I wrote the country. The â€“ga:sessions in the Sort field means that the results are sorted descended by the sessions. The other fields are not very important for your first steps with the Core API.
Now go again to the Add-ons Tab/Google Analytics and click on Run reports. The report will be generated. Now you are capable of creating your very own reports with Analytics data. At some point you may have many reports. Every time you click on the Run reports button, all the reports in your spreadsheet will be generated. This may take some time. So if you are testing queries this might be kind of frustrating. Therefore the Query Explorer is a good way to test your queries.