analytics/lib/plausible_web/controllers/api
RobertJoonas 8ac166b447
Add revenue metrics to Properties report (#3209)
* extract add_exit_rate function

* Change internal API metric names for /entry-pages & /exit-pages

* `unique_entrances` -> `visitors`,
* `total_entrances` -> `visits`,
* `unique_exits` -> `visitors`,
* `total_exits` -> `visits`,

This is just a consistency improvement - the `visitors` metric always means
one thing and there's no need to call it different for entry pages internally.

This commit does not change any noticable behavior. The UI labels are kept
the same and the column headers in the CSV export will also remain the same.

* Change internal API metric names for /conversions

* `unique_conversions` -> `visitors`,
* `total_conversions` -> `events`,

* return revenue metrics from /custom-prop-values (backend)

* be more explicit about which metric is plotted with Bar

* validate that ListReport input metrics actually exist in the API response

* display revenue metrics in the dashboard Properties section

* limit the number of columns shown on mobile

* add revenue metrics to Properties > Details

* review suggestions

* define hiddenOnMobile per metric instead of keeping the first 3

* rewrite if-else block

---------

Co-authored-by: Vini Brasil <vini@hey.com>
2023-08-01 13:52:31 +01:00
..
external_controller.ex derive jason encoder for request (#3182) 2023-07-24 14:46:57 +02:00
external_sites_controller.ex Clean up after V2 migration (#2868) 2023-04-24 12:17:57 +02:00
external_stats_controller.ex Enable sampling in the Stats API (#2985) 2023-06-01 15:35:08 +02:00
helpers.ex Block Stats API for locked sites (#2302) 2022-10-04 15:34:45 +03:00
internal_controller.ex Prevent robots from looking too much into public dashboards (#3118) 2023-07-11 10:47:03 +02:00
paddle_controller.ex Wrap paddle actions with DB transactions (#2558) 2023-01-03 16:14:50 +01:00
stats_controller.ex Add revenue metrics to Properties report (#3209) 2023-08-01 13:52:31 +01:00