-
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
feat: stickiness actors query #27349
base: master
Are you sure you want to change the base?
Conversation
Hey @aspicer! 👋 |
📸 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. |
…aspicer/stickiness
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
Problem
The stickiness actors query only returns the set of users that did the event exactly N times.
Changes
Create a
StickinessActorsQuery
with an operator that allows us to specify exact, gte, or lte.This also adds an optional argument called
intervalCount
to the StickinessQuery which allows it to look at things like "2 day" intervals or "4 day" intervals. This is not used in the UI, but is used in the hogql cohort calculations.When interval count is set, the
StickinessQuery
always looks at whole intervals that end at "date_to."What this means is that if it is Jan 15th, and we are looking at Stickiness by month, the intervals will look like "Dec 16th -Jan 15th", "Nov 16th - Dec 15th", "Oct 16th - Nov 15th" etc.
This is to match the behavior of the current cohorts. This might make sense to add a flag to if we want to provide different options in the Stickiness UI, but for now only exists on the backend for cohorts.
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Wrote a test, looked at SQL.