* Merge branch 'plausible_master'
* Add City level details
* Add City level details
* Use ISO codes instead of geoname_id for subdivisions
* Add easier way to configure geolocation database
* Add workflow for dev branch
* Correct clickhouse migration
* Translate subdivision names
* Translate city names
* WIP
* Region and country filters
* Fix region filter
* Remove region_name when removing region filter
* Add modals for regions and cities
* Remove dead code
* WIP
* Revert "WIP"
This reverts commit 3202bf2fe9.
* Feature flag to hide cities when deployed
* Add changelog entry
* Remove unused code
* Remove unused variables
* Fix test
Co-authored-by: AymanTerra <aymanterra@yahoo.com>
* Add option to specify a URL in the manual extension
* Fix error when option parameter isn't provided
The uglify-js dependency had to be updated to support the optional chaining operator
* Remove the possibility to pass a function for the custom URL
This added weight unnecessarily, as the users can simply call the function themselves before triggering the event.
* Change optional chaining to ternary for improved browser support
* Revert package-lock.json to version 3.9.4 of uglify-js
It was previously updated to support optional chaining; reverting it as a reminder that this is the current browser support level that is accepted by Plausible.
* Only add percentages to dashboard data when not filtering goal
* Correctly name CSV headers when exporting conversion data
* Remove percentages from tests when filtering for goal
* Fix custom property total conversions value not displayed
The custom property conversion metrics are not consistent with the other
metrics resulting in the total conversions not being displayed in the
dashboard. This fixes that.
* Export custom props of current goal when filtering dashboard for goal
This makes the CSV export also output a `prop_breakdown.csv` file which,
for the currently filtered goal, contains the conversion data for each
of its configured properties.
* Add test for goal-filtered CSV export
* Round time_on_page metric returned by 'pages' API
This rounds the `time_on_page` metric returned as part of the `pages`
API to the nearest second. While this shows no apparent change in the
web UI, it removes the decimal from the exported data in `pages.csv`.
* Tidy up export tests
* Round time_on_page in db query
* Add goal to CSV export tests
* Display CSV export spinner until download is ready
The mechanism used to make the page aware that the download is ready is:
- Client code sets a cookie and requests download.
- Server code handles download and removes cookie when complete.
- Client code polls every 1s to check the cookies, removing spinner when
the export cookie is removed.
f576fa2 should have updated the conversion metric names so that
`unique_conversions` and `total_conversions` are the two metrics
returned by the conversions API. This updates those so that the CSV
export outputs the correct data.