PostHog / posthog

šŸ¦” PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.03k stars 1.25k forks source link

Saved filters (or creating actions out of series) #2895

Open andrewm4894 opened 3 years ago

andrewm4894 commented 3 years ago

Is your feature request related to a problem?

No. Would be more of a ease of use improvement.

Describe the solution you'd like

It would be nice to have a "Save Filter" button next to the "Add Filter" button in the "Events & Actions" screen. I typically want to go in and just look at the recent event stream for different subsets of my events and find myself having to manually create the filter each time which can be a bit annoying.

So there could then maybe be a "Saved Filters" teb menu item in the UI in that screen that i could just go to to apply the saved filter i want. Or maybe some better way to do it in terms of UI/UX.

Just feels like maybe some low hanging fruit.

Describe alternatives you've considered

It seems like the filter is stored in the url so i could just bookmark the different filters in my browser as a sort of work around.

Additional context

Not much else.

Thank you for your feature request ā€“ we love each and every one!

I love you too.

thedeveloperr commented 3 years ago

This looks interesting and useful. Can I take this up?

paolodamico commented 3 years ago

+1 from a user today on Slack. Ability to save multiple filter conditions into a single reusable group (like we have on sessions page now).

thedeveloperr commented 3 years ago

How many saved filters can be there ? Will a JSONfield in user model enough ? Or we need a separate table ?

@mariusandra

posthog-bot commented 1 year ago

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label ā€“ otherwise this will be closed in two weeks.

andrewm4894 commented 1 year ago

i think should be kept open

chenjefferson commented 1 year ago

+1. I'll take a look at implementing this later tonight, maybe. Thanks.

Edit: forgot I needed to setup again. I'll take a look on Tuesday.

thinklinux commented 1 year ago

Hey @chenjefferson are you getting some progress on that one? I can take it if you don't have time right now :) Just to be sure that we are on the same page - we are talking about the "Event Explorer" page right? I assume it was "Events & Actions" some time ago?

PandaGnar commented 1 year ago

@thinklinux Hey! Don't have time right now and don't want to keep you waiting. Feel free to take it.

thinklinux commented 1 year ago

I dug I little bit around to get familiar with the code. As far as I can see there is a user that belongs in organisations that has different teams/projects. Couldn't find a good place to save the filters. I assume the filters should be saved per user per team. I don't know if anything else will make a lot of sense. We can save it in the user model with a JSON field that will be something like that

{team_id: {filters: [...]}}

but I'm not sure I want to pollute that one.

@mariusandra (or someone else) can I get a little bit of guidance here with the data modelling part. Is there a good place right now to put the filters and I didn't find it or there should be a new table with filters?

Thank you!

Twixes commented 3 months ago

Closely related: @camerondeleone mentioned a way to create an action out of a series would be useful. This could satisfy the use cases mentioned in this issue in a lot of cases (Actions effectively are saved filters, so by making sure they're intuitive, we might not need separate saved filters).