3 ways to get Google Analytics unsampled data in SSIS

Introduction

If our previous post we saw how to get data from Google Analytics Using SSIS. Once you get going with drag and drop SSIS Google Analytics Connector you may bump up to one interesting challenge. If you request includes sessions more than certain threshold then Google may start sampling your data to give you average number for many Metrics. So how you make sure your request includes all sessions in the calculation. Below sections will describe few ways to achieve this.

Google Analytics Data Sampling Tips

There is no way to guarantee 100% Unsampled data in Standard Google Analytics Account API call because of restriction imposed by Google. However there are few workarounds which may help you to achieve very high rate of Data Sampling.

Most common solution is if you set Sampling option to HIGHER_PRECISION then Google may honor your request upto certain threshold but as dataset grows (e.g. If you select larger date range) google may sample your data even though you set HIGHER_PRECISION.

Google REST API - Automatic URL mode (Build your own query from UI)

Extract data from Google Analytics in SSIS – Use Sample Size option to get Unsampled data

Other ways to get unsampled data from Google Analytics API

Now lets look at few other ways if previous approach doesn’t work.

  1. Narrow down your Date range… e.g. Process day by day rather FULL extract. If day by day is also sampling they try Hour by Hour
  2. Use Google API to generate and download Unsampled data (We don’t have article on this but see below reference).
  3. Use Google Analytics 360 Premium Account then it has unsampled report feature. You can get this via Web Interface or Call API to automate extract. https://support.google.com/analytics/answer/2601061?hl=en

https://developers.google.com/analytics/devguides/config/mgmt/v3/unsampled-reports
https://support.google.com/analytics/answer/2637192?hl=en&visit_id=1-636288218914624195-2113255108&rd=1

Downloading Unsampled report using Google Analytics 360 API – ZappySys REST API Task

If you are Google analytics 360 user and you wish to use API approach to produce file and download in SSIS then you can refer following article. It shows how to call Google API. Its not about Analytics API but you will get high level idea.

https://zappysys.com/blog/get-data-google-spreadsheet-using-ssis/

Posted in Google API, SSIS Google Analytics Source and tagged , , , .