PostHog / PostHog/posthog

Feature Request: Add `or` condition when creating custom exposure events

Open
#69,853 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Feature request
  • Custom exposure events only allow And filters.
  • For example, I would like this experiment to include users in either cohort selected.
  • But right now, it would only show users who are in both.
Image

Describe the solution you'd like

  • It would be great to have an option to select an or filter when you are setting up custom exposures on an experiment.

Describe alternatives you've considered

  • Right now you can create a new cohort which contains the users/logic you'd want.

Additional context

Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019f4765-70c7-7b4d-b710-64cb9ecb5a3d?t=31299
Admin (internal): http://go/adminOrgUS/019c4ed6-add0-0000-998a-30c999608349 (project ID 311650)

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 locating the custom exposure event setup and the existing And-filter implementation, then trace how cohort membership is evaluated. Confirm where the filter choice is stored and applied before deciding which frontend, backend, and test entry points are involved. Done means users matching either selected cohort can be included, while existing And behavior remains unchanged and is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
analytics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.