-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Funnel persons per step and dropoff #4883
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
Conversation
…t for conversion window;
… cleanup via destroy() method
…ed funnel_persons and funnel_trends_persons into individual classes;
…com:PostHog/posthog into funnel-persons-pagination-conversion-window
@@ -1,15 +1,31 @@ | |||
from ee.clickhouse.queries.funnels.base import ClickhouseFunnelBase | |||
from ee.clickhouse.sql.funnels.funnel import FUNNEL_PERSONS_SQL | |||
from ee.clickhouse.sql.funnels.funnel import FUNNEL_PERSONS_BY_STEP_SQL | |||
from posthog.models import Person | |||
|
|||
|
|||
class ClickhouseFunnelPersons(ClickhouseFunnelBase): | |||
def get_query(self, format_properties): |
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.
Small refactoring note for the future (not necessary for now, but for when we move FunnelNew
->Funnel
):
It seems to me like format_properties
are not generic enough anymore to warrant a place in the basic get_query
signature? maybe it's worth every query generating its own properties that it needs.
For example, here it's a bit confusing that offset
is missing, but turns out it comes from format_properties
, and is literally equal to self._filters.offset
- which seems to be the only thing being used
Changes
Please describe.
funnel_step
parameter that specifies the step at which you want the list of persons. Indexing starts at 1 so 1 = first step, 2 = second step, etc. The dropoffs are denoted by negatives so the people that dropped off from the first to second step would be -2, dropoffs from second to third step would be -3, etc.If this affects the frontend, include screenshots.
Checklist