Open benjackwhite opened 4 months ago
I full-on love this. This feels very similar to what I've been proposing around having templates for every product, but with more user customization!
I really like this too and plays nicely with some of the changes we were recently talking about in Replay land around filtering & playlists.
One thing not mentioned that might be worth considering is whether these saved filters can be combined in any way. Thinking about session replay I'd like users to be able to construct queries like:
VIP customers
who Had errors in their session
New users
who Converted
Ideally, I'd like not to have to make saved filters like VIPs with errors in sessions
. Perhaps it's just a UI level thing where we wouldn't use a select dropdown for replay but curious to know if combinatorial filter groups would be possible?
I like this too! Agree would be very useful for session replay.
In the concept of a filter as described above, is it 1 property = 1 saved filter? Or could one filter also be multiple properties?
If we did not have Actions and Cohorts I would say this is a no-brainer, but we already have them, and they already are saved filters in essence β as you pointed out @benjackwhite. You can apply actions and cohorts as filters in lots of places. Why is this not something much simpler: a parametric action?
As for the issues linked:
Following up on this as it might be useful context from the replay point of view:
Cohorts are super powerful so I get the pushback on replicating a lot of their functionality elsewhere but Saved filters (that can contain Cohorts) seem like the thing that would make most sense from a Replay perspective.
Is your feature request related to a problem?
Trying to sum up what I think is the right solution for a range of issues: https://github.com/PostHog/posthog/issues/11838 https://github.com/PostHog/posthog/issues/19680 https://github.com/PostHog/posthog/issues/19477
In particular this came up in conversation about whether we need a "sites" concept for Web Analytics (related to this) which I pushed back on.
Describe the solution you'd like
Part 1 - Saved filters
I believe the problem we have is that people are often applying the same sort of filtering again and again in PostHog. We partly solve for this across Events and Persons via Actions and Cohorts (which are essentially
Saved Filters for Events
andSaved Filters for Persons
).Once saved, you could save filters as "favourites" or something, which would mean that anywhere that the filter applied it would show up automatically as a top level dropdown.
Derive an icon automatically based on the filter or allow them to specify one for easy visible matching.
These are then available anywhere that we would have an "add filter" option - Activity, Persons, Session Replay, Trends filters etc. Likely we would need some way of distinguishing the "target" of a filter so that we only show saved filters that make sense (i.e. we don't show a filter based on events for the persons page)
Part 2 - Dynamic saved filters
Saved filters would allow you to save a common pattern (think
filter internal users
) that you could apply anywhere easily.You may however not want to specify a hard coded value, but rather a "selectable" value. For example you might want to have a saved filter that dynamically gives you a dropdown of options based on a query value.
The top use case here I could see is something like Web Analytics "sites" - you specify a query (maybe a hogql query) to get a list of distinct values:
Then you can configure it as a favourite making it easy to select from a dynamic list
With an additional setting we could make it show at the very top level.
Part 3 - Default filters
Like we have an option for defaulting internal user filtering for insights, we could apply the same here either on a page by page basis or just globally. That way you are seeing the data you are looking for faster as you navigate PostHog.
Describe alternatives you've considered
The main proposed alternative is a full on "sites" concept. My main reservations with that are:
Additional context
Internal slack thread that prompted this
Thank you for your feature request β we love each and every one!