-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: exclusion logic in udfs #25890
fix: exclusion logic in udfs #25890
Conversation
…g into aspicer/trends_exclusions
…g into aspicer/trends_exclusions
…g into aspicer/trends_exclusions
Hey @aspicer! 👋 |
…g into aspicer/trends_exclusions
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Deploys with #25918 and https://github.com/PostHog/posthog-cloud-infra/pull/3197
Problem
Certain aspects of exclusion behavior differed across UDF funnels and classic funnels, but was untested.
Specifically what happens to a user if they reach an exclusion step but don't go past it.
This was causing large discrepancies especially in the trends view
See here for more details
Changes
Add tests for a variety of exclusion cases that were differing between UDFs and classic trends. Modify the UDF trends to match the classic trends on most of these cases.
One breaking change which is actually a correction is that old trends would exclude a user if the exclusion and following event happened after the funnel interval. This shouldn't be the case, so I changed the behavior here. This causes a few more users to show up in the denominator of the trends query, but not a lot (~0.2% change).
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Wrote a bunch of tests.
Tested it by running the new code against the production data that was incorrect (for two large users) and verifying that we get the correct result.