This PR starts using the new QueryBuilder in breakdown module with a compatibility layer for the old response schema.
The following changes also happen as a side-effect:
bounce_rate is reported as 0 not nil when site is not entry page
revenue metrics are handled in breakdown module. When added to apiv2 it would be wise to include currency in response and add validation errors when site does not have access to revenue
time_on_page is a special case within the breakdown module.
imports.ex gets significantly changed (to remove old compatibility hacks)
QueryOptimizer also changes event:page to visit:entry_page filter when doing a breakdown by event:page and querying session metrics. Required for imports.
Garbage filters (which pass validation) cause query to return false
Breakdown module default ordering subtly changes, causing changes in some tests.
Changes
This PR starts using the new QueryBuilder in breakdown module with a compatibility layer for the old response schema.
The following changes also happen as a side-effect:
time_on_page
is a special case within the breakdown module.Depends on https://github.com/plausible/analytics/pull/4251