Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full support for Filters #15438

Open
viezel opened this issue Jan 22, 2020 · 14 comments
Open

Full support for Filters #15438

viezel opened this issue Jan 22, 2020 · 14 comments
Labels
Enhancement For new feature suggestions that for example enhance Matomo's cabapilities.. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@viezel
Copy link

viezel commented Jan 22, 2020

Since Segments cannot be used as filter anymore (see #15163) Then I put forward this high priority feature request to add full feature support for Filtering. Suggesting Custom Reports plugin as a solution for this feature is not an option. This feature must be part of the core offering.

Most modern web application are data driven and as part of its value proposition it will create dashboard, reports etc to inform its users of the usage of their offering. Building user defined reports/views/dashboards based on user interactions will include filtering, as the user want to see exact results. Filtering and segmentation is the essentials features of any Analytics platform. Hence, we must build this missing feature at its highest priority.

How

As Matomo also advertise to be a replacement of Google Analytics, then lets see what they do:

Filtered queries restrict the rows that do (or do not) get included in the result. Each row in the result is tested against the filter: if the filter matches, the row is retained and if it doesn't match, the row is dropped.

Dimension filtering: Filtering occurs before any dimensions are aggregated, so that the returned metrics represent the total for only the relevant dimensions.

  • Metrics filtering: Filtering on metrics occurs after the metrics are aggregated.
  • Valid combinations: You can filter for a dimension or metric that is not part of your query, provided all dimensions/metrics in the request and the filter are valid combinations. For example, you might want to query for a dated list of pageviews, filtering on a particular browser.

Source: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters

For rich possibilities of Filtering the massive amount of data a regular website/app gets, we need the following operators:

Metric Filter Operators

Operator Description
== Equals
!= Does not equal
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to

Dimension Filter Operators

Operator Description
== Exact match
!= Does not match
=@ Contains substring
!@ Does not contain substring
=~ Contains a match for the regular expression
!~ Does not match regular expression

It would be a big plus if we could get support for Regular expression in those filters.

Filter Syntax

Given the fact that Segments are alreadty supported, we only need to invent a filter parameter.

metric_dimension_name operator expression

Example:

filter=referrerName==Google,referrerName==Bing;country==IN
@Chardonneaur
Copy link

Silly remark, though wouldn't it be the same feature as the shortcut one in Google Analytics? So to say applying a filter gives you the possibility to save it and to make it as custom report (though you won't have the possibility to add additional columns)

@marcorieser
Copy link

vote 👍

@tsteur
Copy link
Member

tsteur commented Jul 23, 2020

Hi there,

quick update here:

We'll see next year (this year is already fully planned) whether work on this or not. It's not too high of a priority because:

  • segments can be put into "filter" mode with a config flag (of course it then applies to all segments). To enable this set [General]enable_segments_cache=0 in config/config.ini.php
  • custom reports plugin already supports filters and it is a lot more performance friendly than any solution in core likely can be (because the filter can be configured for specific reports vs core would likely need to do generate filtered report for every available report)
  • It be a big big feature to develop taking lots of time while there are already workarounds possible
  • I has performance implications (which is one of the reasons why we fixed the previous segment logic in first place)
  • It will potentially clutter the UI (when we were looking at possibly implementing this we hadn't yet figured out a way to do it nicely)

I do fully understand it's useful and would love to have this too. The combination of performance trouble, taking long time to develop etc while there are workarounds makes it not the best candidate to work on right now though (not saying we won't do it next year or so)

@marcorieser
Copy link

@tsteur It seems that I missed the configuration option in the documentation. Thanks for the hint and the update. This will be fine for us for the moment. 👍

@tsteur tsteur changed the title Full support for Filters in Matomo 4 Full support for Filters Oct 19, 2020
@Petsios
Copy link

Petsios commented May 20, 2021

Hello,

is this config still available (working) with version 4.2.1?:
segments can be put into "filter" mode with a config flag (of course it then applies to all segments). To enable this set [General]enable_segments_cache=0 in config/config.ini.php

Thanks a lot

@Findus23
Copy link
Member

Hi @Petsios,

Nothing changed about this since the release of Matomo 4:

; whether to enable segment archiving cache
; Note: if you use any plugins, this need to be compliant with Matomo and
; * depending on the segment you create you may need a newer MySQL version (eg 5.7 or newer)
; * use a reader database for archiving in case you have configured a database reader
enable_segments_cache = 1

@jr-ewing
Copy link

Hi, sorry for the question ...
Is there any progress here?
It would be great if, for example, you could specify whether a segment should have Action or Visit Scope.

@viezel
Copy link
Author

viezel commented Oct 20, 2021

Hi all,

I can really recommend migrating to https://posthog.com/. We did this after the fact that Matomo cannot provide real segmentation and cohort analysis. Its open source, self hosted and super powerful.

@sgiehl
Copy link
Member

sgiehl commented Oct 20, 2021

It would be great if, for example, you could specify whether a segment should have Action or Visit Scope.

@jr-ewing Isn't that kind of automatically defined by the segment? As soon as an action dimension is used its an action scope otherwise it's visit scope. Or what exactly do you mean here?

@KarthikRaja1388
Copy link

Customer's request: I want to build widgets that work with the filters.

@sgiehl
Copy link
Member

sgiehl commented Feb 14, 2022

@KarthikRaja1388 Are you able to explain that a bit more? Does he want to e.g. show an page url report, that only contains urls that matches a certain pattern, or is that request really about filtering the data before archiving?

@KarthikRaja1388
Copy link

@sgiehl Will post the customer's full question:

In the Custom Report Plugin I have the option of filters. So I want to build widgets that work with the filters. Segments not working for me - in this case.

What I want to recreate is the table under "Pages". My widget should have the same columns as under "Pages". In addition, I want to display the entry columns, which you can currently find under entry pages.

So I would like to show the values ​​of a URL.
So say 1:1 the values ​​from Pages.

@atom-box
Copy link

atom-box commented Nov 3, 2023

Matomo: What is the feature you are missing the most in Matomo and why?
User: ...option for multiple filtering

@atom-box
Copy link

atom-box commented Nov 6, 2023

Question:
What is the feature you are missing the most in Matomo and why?
Answer:
Segment reports temporarily without creating permanent report segments. View event category, action and value simultaneously for events.
(Answer in Deutsch: Reports vorübergehend segmentieren, ohne dauerhafte Berichtssegmente zu erstellen. Für Ereignisse Ereigniskategorie, Aktion und Wert gleichzeitig betrachten.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that for example enhance Matomo's cabapilities.. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests