plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19.93k stars 1.06k forks source link

Implement filtering for imported data #4118

Closed RobertJoonas closed 4 months ago

RobertJoonas commented 4 months ago

Changes

This PR adds support for filtering by imported data. What we can or cannot filter by is limited by the imported schemas. Usually that means that the relation between different properties does not exist - e.g. we cannot filter by page and break down by source. That information doesn't exist. However, in some tables, there are several properties - e.g. imported_locations contains country, region and city propertis. That means that filtering by country and breaking down by city is possible.

Whenever filters are applied and imported data is included in the currently viewed period, we will display warning bubbles if a certain report is not able to include imported data:

image

Note that this does not mean that native data is excluded - the dashboard in the screenshot simply doesn't have any.

Tests

Changelog

Documentation

Dark mode

macobo commented 4 months ago

Request: If we can merge this faster by splitting this into separate FE and BE PRs I'd appreciate that. Blocked on a large chunk of query/APIv2 work on these changes.

RobertJoonas commented 4 months ago

Request: If we can merge this faster by splitting this into separate FE and BE PRs I'd appreciate that. Blocked on a large chunk of query/APIv2 work on these changes.

I think we don't need to split it and can go ahead and merge it on Monday.