You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/controllers
RobertJoonas 0d6c72d50f
Add new `Pages / Visit` metric to Stats API Aggregate and Timeseries (#2714)
* refactor metric validation

* link to the correct docs section

* add the new metric to aggregate API

* explicitly remove __internal_visits

The overall metric selection is well defined by
`Plausible.Stats.Timeseries.empty_row/2`. The only metric that needs
to be removed from the timeseries response is __internal_visits.

This commit also moves the `remove_internal_visits_metric` function to a
new Util module to be used by both breakdown and timeseries.

* add the new metric to timeseries API

* mix format

* add moduledoc to keep credo happy

* convert pages_per_visit to string straight away

* do rounding in db query

* query # of visits with sum(sign) instead

* stop converting pages_per_visit to string
4 years ago
..
api Add new `Pages / Visit` metric to Stats API Aggregate and Timeseries (#2714) 4 years ago
site improve transfer ownership error message (#2651) 4 years ago
auth_controller.ex Delay stats deletions (#2632) 4 years ago
billing_controller.ex Redirect user after upgrading only when subscription is created (#2285) 4 years ago
error_report_controller.ex Prevent error reports from being sent with short feedback (#2635) 4 years ago
helpers.ex Initial commit 7 years ago
invitation_controller.ex fix ownership transfer when is_selfhost=true (#2455) 4 years ago
page_controller.ex improve first launch experience for self-hosters (#2357) 4 years ago
site_controller.ex Keep track of native stats start timestamp when retrieving data (#2715) 4 years ago
stats_controller.ex Don't rely on Mix.env check in runtime (#2703) 4 years ago
unsubscribe_controller.ex Add presence check when unsubscribing from email reports 6 years ago