* 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.
* 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.
* Export all dashboard data in zip
This packages all data currently visible in the dashboard into
individual CSVs and downloads them together in a zip.
* Also export conversions in zip of CSVs
* Update export test with zip file response
* Add zip file download to changelog
* Adds pagination for custom props, fixes errant (none) being returned in the middle of a dataset
* Formatting
* Fixes errant (none) value correctly
* Changelog
* Adds tests
* Add conversion_rate to sources api and source table
* Remove percentageFormatter
* Update source tests to include conversionat rate
* Add CR to detals modal
* Correct formatting with linter
* Add change log
* Add CR to Pages, Device and Countries panels