alooi14 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 1 forks source link

start-index parameter is not paging results properly in the Core Reporting API (v3) #577

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Name of affected component: Core Reporting API (v3)

Issue summary:
In responses to requests to the Core Reporting API (v3), the start-index 
parameter is not paging the results properly.

Steps to reproduce issue:
1. Make a request with max-results less than totalResults and with a 
start-index.
2. Make another request with the same max-results and a start-index that is one 
less. 
3. The returned rows are not distinct pages; instead, there is much overlap in 
the rows returned from the two queries.

Expected output:
What do you expect to see after performing the above steps?
A request with a different start-index should return a response with rows that 
are all different.

Actual results:
What do you actually see after performing the above steps?
Instead of different rows, my requests with a different start-index return a 
response with mostly the same rows.

Notes:
Attached are logs containing the query-params and urls of our requests along 
with the responses we receive. The responses have been annotated to highlight 
the unexpected duplicate rows.

Original issue reported on code.google.com by jkarsten...@rjmetrics.com on 27 Jan 2015 at 8:00

Attachments:

GoogleCodeExporter commented 8 years ago
https://developers.google.com/analytics/devguides/reporting/core/v3/reference#st
artIndex

The Start-index is the actual row index not the page index. To accomplish 
pagination simply use
start-index = n*max-results + 1
where n is the page you would like returned.

Original comment by mcoh...@google.com on 27 Jan 2015 at 8:19

GoogleCodeExporter commented 8 years ago
Oh, we misunderstood the documentation on that parameter.

Thank you for your help and the speedy response!

Original comment by jkarsten...@rjmetrics.com on 27 Jan 2015 at 8:58