0
votes

Do the Google Analytics API methods allow to get the same amount of data, that is accessible through the web UI?

The problem is, for example, that in browser I can see more that 3000 lines in a report, but the API method returs only several hundreds.

Here is a URL for API method that I use: https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A73XXXXXX&dimensions=ga%3ApagePath%2Cga%3Akeyword&metrics=ga%3Avisits%2Cga%3AvisitBounceRate&sort=-ga%3Avisits&start-date=2015-09-01&end-date=2015-09-30&start-index=1&max-results=3000

1

1 Answers

0
votes

The API method you are using has queries appended on it. (Everything after the '?' and seperated by the '&') These are not part of the URL but actually information that is used by the server to customize your result. By changing the URL to say: https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A73XXXXXX&dimensions=ga%3ApagePath%2Cga%3Akeyword&metrics=ga%3Avisits%2Cga%3AvisitBounceRate&sort=-ga%3Avisits&start-date=2015-09-01&end-date=2015-09-30&start-index=1&max-results=10000 , you should get more results in your response. You may also want to change the start and end date, just make sure to keep the YYYY-MM-DD format.