Skip to content

Complete GA4 report pagination - #68

Closed
indiviedualis-ui wants to merge 1 commit into
googleanalytics:mainfrom
indiviedualis-ui:indiviedualis-ui-complete-ga4-pagination
Closed

indiviedualis-ui wants to merge 1 commit into
googleanalytics:mainfrom
indiviedualis-ui:indiviedualis-ui-complete-ga4-pagination

Conversation

@indiviedualis-ui

Copy link
Copy Markdown

Why

The GA4 pagination sample only demonstrated two fixed requests and did not explain when to advance the offset. This could lead to unnecessary requests or incomplete handling of reports larger than one page.

What changed

  • Iterate through report pages in 100,000-row increments.
  • Use response.row_count to stop once all matching rows have been covered.
  • Add a unit test verifying the expected offsets for a multi-page response.

Validation

git diff --check passes. The focused pytest could not run because Python/Pytest is unavailable in the environment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@google-cla

google-cla Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@indiviedualis-ui

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant