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
20.73k stars 1.24k forks source link

Being able to delete old event data and keep insights (as in Matomo) #11763

Open cortopy opened 2 years ago

cortopy commented 2 years ago

Is your feature request related to a problem?

My self-hosted instance of posthog keeps growing and growing even though it's a very small site.

Describe the solution you'd like

I would like something like Matomo provides: https://matomo.org/faq/troubleshooting/faq_42/

Users have the ability to delete old event data while still keeping some reports (I guess some materialized tables), or delete everything that's old, including reports.

Solution in posthog would look something like:

Describe alternatives you've considered

Posthog docs refer to a script to delete old data but there is no guarantee it will work, as it can even break the whole instance. In fact, the author of the script has acknowledged that this is a very old script and it's likely to break in newer versions

Additional context

This feature would also align with GDPR efforts to only keep data for as much as needed, and never more.

yakkomajuri commented 2 years ago

Hey @cortopy! This is something we might work on a solution for, but for now you can always go into the DB yourself and delete data you no longer need (being careful!!)

cortopy commented 2 years ago

thanks @yakkomajuri but how would I know what is safe to delete and what isn't? I wouldn't even know where to start as I don't know the data model. And even if I could work it out, how do I know that things are the same in future releases?

(also, I wouldn't like to lose historical insights)

posthog-bot commented 4 days 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.