-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard campaigns Row per page not working #1887
Comments
After some investigation it seems like we need to implement the Google API pagination. Seems like it's not an easy fix since Google API Pagination works with PageToken links instead of OFFSET param. But in overview the steps to make it happen could be: Backend:
Frontend:
|
While working on this PR #2472, I was also considering this issue. However, a downside of using pagination is that the pagination component requires the total number of results across all pages. Currently, Google doesn't offer an equivalent of |
The Ads API does allow you to return the total amount in the original query through using If we are using the library it will be named slightly different, but this example shows how to enable it and get the total results: https://developers.google.com/google-ads/api/samples/get-all-disapproved-ads#php Would that match our pagination structure? |
Thanks @mikkamp for your comment! Yes, I misread the description of return_total_results_count and thought it was returning the number of results for the current query. I adjusted the PR #2472 to add some pagination headers that will allow us to get the total number of pages, total results, and the next page token. From the UI perspective, I think we could disable the Go to Page feature to keep it simple, as it seems that it's not straightforward to get the forward page token until you access the page (for example, jumping from page 1 to page 5). Here is an example: https://developers.google.com/google-ads/api/samples/navigate-search-result-pages-caching-tokens. The backward tokens can be cached in the client, so the merchant can navigate backwards and one page forward (through the pages that we already loaded) |
Thanks for the clarification. As seen in issue #811 we aren't very consistent in how we display / handle the pagination bar. We don't always have the "go to page" or "rows per page", so I think it makes sense to leave it out in this case. Edit: I mean just leave the "go to page" out. The "rows per page" seems handy. |
We did update the API endpoints to support pagination in #2472 Unfortunately pageSize has been removed since Google Ads API V17+, each request will always use a page size of 10,000 and return an error if we set it to anything else. This means we'll have to revert the previous solution as we aren't ready yet to go for an interim solution where we can map between paginated requests and the results returned by the Google API. |
Describe the bug:
While testing PMAX campaigns I realised I had more than 25 campaigns but paginator still shows 25 per page and showing my 35 campaigns.
Steps to reproduce:
Expected behavior:
Actual behavior:
Screenshots
Screen.Recording.2023-02-14.at.20.58.50.mov
The text was updated successfully, but these errors were encountered: