Support historical cohort membership in exports and analysis
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Feature request
Is your feature request related to a problem?
Currently, it’s not possible to track or analyze historical cohort membership in PostHog. Cohorts are dynamic, so we can only see who is in a cohort right now, not who was in it at a specific point in the past. This makes it difficult to track cohort growth over time or to analyze user behavior based on the cohort they belonged to when an event occurred. Manual workarounds or external scripts are required.
Describe the solution you'd like
The ability to perform analysis in insights, funnels, and other tools using the cohort a user belonged to at the time of each event (historical cohort membership), not just their current cohort.
The ability to visualize cohort membership size over time within PostHog.
Describe alternatives you've considered
Manually recording cohort sizes each day, which is not scalable.
Writing custom scripts to call the API daily and store cohort sizes externally.
Enriching events with cohort membership at the time of the event, but this adds complexity and maintenance overhead.
Additional context
This feature would help with accurate cohort-based reporting, campaign analysis, and understanding user behavior trends over time. It would also reduce manual work and reliance on external tools.
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or entry points. Start by mapping how cohort membership is represented in insights, funnels, exports, and time-series visualizations; done would include historical membership at event time and cohort size over time.
Written by the indexing model from the issue text.
Assessment
- Domain
- analytics, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100