tomdyson / wagalytics

A Google Analytics dashboard in your Wagtail admin
MIT License
217 stars 42 forks source link

See more than 5 pages of referrers #31

Open alexgleason opened 5 years ago

alexgleason commented 5 years ago

In ProjectTIER/projecttier.org#111 I've been asked to make the "next" button show more than 5 pages of results.

I'm guessing pages 1-5 are hardcoded in an GA API call somewhere. My plan is to request pages 5-10 once page 5 has been passed in the dashboard.

alexgleason commented 5 years ago

The API gets queried with a "max-results" field, set to 25 here: https://github.com/tomdyson/wagalytics/blob/master/client/src/wagalytics.js#L224

We could increase this value by a lot (increasing it to 500 still works over a range of 5+ years, but setting the range to 20 years will crash it).

Alternatively, we could detect when the final page is reached, then query the API for 5 more pages. This means actually writing code (technical debt), but could be worth it.