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
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
..
auth Handle duplicate invitations gracefully (#2323) 4 years ago
billing Wrap paddle actions with DB transactions (#2558) 4 years ago
event Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
goal Trim goals when creating and retrieving from the DB (#2382) 4 years ago
google Save city name when importing from GA (#2608) 4 years ago
helpers improve transfer ownership error message (#2651) 4 years ago
imported Save city name when importing from GA (#2608) 4 years ago
ingestion Use user-agent instead of screen_width to get device type (#2711) 4 years ago
sentry Use finch in sentry client (#1996) 4 years ago
session Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
site Update native stats start date when transferring (#2719) 4 years ago
stats Add new `Pages / Visit` metric to Stats API Aggregate and Timeseries (#2714) 4 years ago
telemetry Gatekeep ingestion pipeline (#2472) 4 years ago
application.ex Implement ingest counters (#2693) 4 years ago
async_insert_repo.ex Implement ingest counters (#2693) 4 years ago
clickhouse_repo.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
geo.ex Stop logging invalid_address errors from Locus (#2604) 4 years ago
goals.ex Improve test coverage (#2392) 4 years ago
http_client.ex Trace external HTTP requests (#2419) 4 years ago
ingest_repo.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
mailer.ex Do not report hard bounce e-mail errors to Sentry (#2361) 4 years ago
mailer_test.exs Do not report hard bounce e-mail errors to Sentry (#2361) 4 years ago
open_telemetry.ex Remove ingestion requests and Oban queries from OTEL (#2543) 4 years ago
prom_ex.ex Add extra error info + telemetry for AsyncInsertRepo (#2708) 4 years ago
purge.ex Keep track of native stats start timestamp when retrieving data (#2715) 4 years ago
repo.ex Pagination for sites listing (#994) 6 years ago
site.ex Update native stats start date when transferring (#2719) 4 years ago
sites.ex Keep track of native stats start timestamp when retrieving data (#2715) 4 years ago
themes.ex Adds dark mode to entire dashboard (#467) 6 years ago
timezones.ex Fix timezone list when time changes (#2268) 4 years ago