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.
Other ways to get unsampled data from Google Analytics API
Now lets look at few other ways if previous approach doesn’t work.
- 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
- Use Google API to generate and download Unsampled data (We don’t have article on this but see below reference).
- 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
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.