Feature Request: Filter and breakdown events by a user's feature flags, even if not sent on the event
@dmarticus is already working on this.
Since Jul 15, 2025.
- 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?
Our team wanted to run analyses comparing users based on their feature flag exposure, but found that this only works reliably when the flag data is included directly on the event.
However, many of our events (especially backend events) don’t carry feature flag values, and we don’t want to modify every single event to include them.
Describe the solution you'd like
We’d love to be able to filter or break down any identified user’s events by their known feature flag assignments at the time, even if those events didn’t explicitly include flag values.
Since PostHog already knows which flags a user has been exposed to (e.g. via $feature_flag_called or /decide//flags), it would be ideal if that exposure could be treated like a person property, so we can:
- Filter events by feature flag values the user had at the time
- Break down events by feature flag variants (without needing to enrich every event)
Describe alternatives you've considered
- Manually attaching flag values to backend events (but this clutters our event schema and is error-prone)
- Creating a custom person property that mirrors feature flag state (what we’re currently doing, but has edge cases and maintenance overhead)
- Using funnel or SQL insights to correlate backend events with frontend-exposed flags (more flexible but requires complex joins)
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/33905 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/35648)
Debug info
null
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.
Assessment
This issue has not been assessed yet.