plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19k stars 1.02k forks source link

Re-apply multiple filters in FE #4219

Closed macobo closed 3 weeks ago

macobo commented 3 weeks ago

This re-applies https://github.com/plausible/analytics/pull/4218. Fix in last commit: https://github.com/plausible/analytics/pull/4219/commits/81b451733ca7ebdb2b7565351f7cb2e85d3742b0

ukutaht commented 3 weeks ago

What do you think about changing the backend instead to consider an integer value for city ID as valid? And fail validation if String cannot be cast to Integer?

If we keep only accepting String for city ID then I think we should also make sure to cast it to String in API responses, otherwise we won't be accepting the exact value we return to clients. But forcing it into an Integer feels better to me since that's what it actually is :)

macobo commented 3 weeks ago

@ukutaht Agreed. Will create a follow-up PR for this to keep PR history a bit cleaner though and since it makes most sense to test this with the apiv2 tests.