Amardeep
Amardeep

Reputation: 31

How to extract Google Analytics historical data using APIs. Pros and cons?

I'm doing a quick proof of concept to understand the procedure to extract historical data from Google Analytics to be further used for offline data stitching to generate a holistic view of data and its analysis. I have not found any detailed online documentation available to understand pros and cons.

Would like to know any limitations on:

  1. The time period for which data can be extracted or any limitation for max. calendar days?
  2. Whether all dimensions/metrics can be extracted or any specific ones?
  3. Will the data be real-time or sampled?
  4. Can all data be pulled into a single table or separate ones?
  5. Will it be available for both freeware and premium version?

Upvotes: 3

Views: 1544

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117321

The time period for which data can be extracted or any limitation for max. calendar days?

Start date can not be before the launch of Google analytics on '2005-01-01'. Due to processing time lag extracting data that is newer then 2 days old can result in incomplete data. Recommend checking the isDataGolden flag on the response.

Requesting large date ranges can result in sampling which can not be prevented. Its best to request the data in small chunks.

Whether all dimensions/metrics can be extracted or any specific ones?

A list of the dimensions and metrics you can extract can be found here. Each request can contain a maximum of 7 dimensions and 10 metrics.

Will the data be real-time or sampled?

Real-time API and Reporting API are two different APIs. Real-time API is not to my knowledge sampled but as its only about five minutes of data I find it hard to think anyone but really big websites will hit this problem if it is.

Will it be available for both freeware and premium version?

Accessing Google Analytics APIs is free there is no charge. There are however limits on how much data you can extract in a given day.

  1. By default your application can run a maximum of 50k request a day. This can be extended.
  2. Each view you are extracting from can make a maximum of 10k requests day. This can not be extended.

See: limits and quotas for more info.

Note: I am a developer on a business intelligence application that extracts Google Analytics data. I can tell you that its definitely doable.

Upvotes: 3

Related Questions