PostHog / PostHog/posthog

Experiments: no way to use query-time person properties in metric breakdowns

Open
#96,876 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature/experiments team/experiments
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Is your feature request related to a problem?

A customer backfilled a person property (acquisition_channel) onto their customer base via warehouse person properties and wants to break down a running experiment's funnel metric by it. The values never show up: experiment breakdowns evaluate person properties at event time, and the backfill only updates the person, not the person_properties snapshot on historical events.

Product Analytics covers this with the "Use person properties from query time" toggle. Experiments have no equivalent - the experiment query runner only takes the project-level persons-on-events mode and ignores per-query modifiers, and orgs created after June 2024 can't see the project-level mode setting anymore, so they have no way to reach query-time values in experiments at all. The activation-event exposure model and breakdown attribution work don't change this - they change which event is read, not when person properties resolve.

Describe the solution you'd like

Let experiment metrics resolve person properties at query time - a per-metric toggle like insights, or respecting query modifiers in the runner.

Describe alternatives you've considered

Workaround given to the customer: one funnel metric per property value, filtered with the SQL expression pdi.person.properties.acquisition_channel = 'x' (must be pdi.person - plain person.properties still reads the event snapshot). Doesn't scale past a handful of values.

Additional context

Warehouse person property sync will keep generating this demand - backfilled properties are exactly the ones that don't exist at event time.

Internal thread with Marcel's full analysis: https://posthog.slack.com/archives/C07PXH2GTGV/p1788793126636989
Ticket Number 71216

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the experiment query runner and how it handles the project-level persons-on-events mode. Compare that path with Product Analytics' "Use person properties from query time" toggle and query modifiers. Done means experiment metric breakdowns can resolve backfilled person properties at query time, with coverage for the selected per-query behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
analytics, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.