analytics/test/plausible_web/controllers
Matt Colligan f576fa2a2c
Improvements to CSV export (#1427)
* Add details=True to export API parameters

This makes the ZIP export add `%{"details" => "True"}` to the query's
`params` when fetching data internally for packaging in the ZIP.

This adds bounce_rate and time_on_page to the data in pages.csv, and
bounce_rate and visit_duration to sources.csv.

* Make API return data with consistent names

Some of the data types returned via the JSON or CSV API use inconsistent
naming, and some have redundant name changes (i.e. count -> visitors ->
count). This makes these all consistent and removes the redundancy.

This addresses #1426, fixes some of the CSV headers, and unifies the
JSON and CSV return data labels.

* Update changelog

* Test should use Timex.shift, not relative time

* Return full country names in CSV export

This also replaces the " character with ' in two country names, as those
are the characters used in the names, yielding a more predictable and
'correct' output.

* Fetch CSV exported data concurrently

* Use spinner to indicate when export has started

* Use 300 as default number of brekadown entries for export

Higher numbers (e.g. 1000) seem to cause clickhouse errors when there
many pages to request. It is unclear what is causing the error, as
clickhouse returns an "unknown" error code and an empty error message.
2021-11-04 14:20:39 +02:00
..
api Improvements to CSV export (#1427) 2021-11-04 14:20:39 +02:00
site Invitations (#1122) 2021-06-16 15:00:07 +03:00
admin_auth_controller_test.exs Use GET instead of POST for logout 2021-03-31 16:49:05 +03:00
auth_controller_test.exs Use more path helpers 2021-10-26 10:59:14 +02:00
billing_controller_test.exs Add enterprise plans 2021-10-20 16:49:11 +02:00
invitation_controller_test.exs Make sure ownership transfer sets trial_expiry_date 2021-10-12 10:28:32 +02:00
site_controller_test.exs Use more path helpers 2021-10-26 10:59:14 +02:00
stats_controller_test.exs Improvements to CSV export (#1427) 2021-11-04 14:20:39 +02:00
unsubscribe_controller_test.exs Add presence check when unsubscribing from email reports 2021-05-03 16:56:46 +03:00