umami
umami copied to clipboard
Support wildcard filters
I'm offering this here for discussion, as requested by @MariusVB; not as a "please merge this now". If it's unhelpful, please just close. There's a lot I don't know about this project.
There's 2 commits, neither is tested.
-
4389fd72c2b751862482a47dc9fa16bd03ae5821 Support the LIKE operator. This seems like it might be a way to offer a LIKE operator at the query level. It doesn't expose it in the UI, but perhaps it means there's a way to manually construct a URL, which might enable the feature for technically capable types who just need the feature in a hurry for certain reports. This code might work, and it might be simple enough to add LIKE to the UI.
-
5b7e38234791f2ebbc44d1811c63260e50f8c06c Support automatically using the LIKE operator (as opposed to equals) if the input contains
*character(s). This commit is likely highly contentious, and probably not what is wanted long term, if at all! It might not work anyway; I'm not sure how mutable the filters object is.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| umami-analytics-us | ⬜️ Ignored (Inspect) | Visit Preview | Oct 26, 2023 9:52am |
@artfulrobot is attempting to deploy a commit to the umami-software Team on Vercel.
A member of the Team first needs to authorize it.
@MariusVB (in case @ ing within a link does not work!)
@mikecao - could we add wildcard filters like this? It would be extremely useful.
If you have a page like this:
/foo/:id/smth
/foo/:id/bar
/foo/:id/fubar
It would be useful to be able to count pageviews like /foo/:id/* instead of having to make N requests for each foo/:id .
@MariusVB What do you want to query there? I think this would be solved by the LIKE operator.
LIKE "/foo/%/smth"would match/foo/a/smthand/foo/b/smth...LIKE "/foo/%" would match/foo/a/smthand/foo/b/smthand/foo/a/barand/foo/z/fubar`LIKE "/foo/123/%"would match/foo/123/smthand/foo/123/bar...
We ended up querying the analytics db directly, instead of using the API.
Latest version now supports contains logic.