-
Notifications
You must be signed in to change notification settings - Fork 96
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
[SL-1290] Conversion Metrics #252
Comments
Hey @nhandel - Funnels can get a little more complex with multi-step funnels, duplicate events, measuring time to conversion, holding certain properties constant, etc. It may be worth looking into How Amplitude computes funnels as you start introducing this feature in metric flow |
Have you considered what time of time grains you'd support? In particular, seconds, minutes, and days seem most useful. Also, how would you handle it if a user had multiple base or conversion events within the specified time window? |
Thanks for sending that over, Sid!
Are there any other thoughts from the Amplitude doc or anything else we should think about? |
Re multi-step: Re duplicate events: both base and conversion
Re time grains Re holding properties constant The other things I'd say that would be useful -
|
Multi-step: duplicate events: time grains holding properties constant
Measuring time to conversion, Counting users and frequency of conversion
This could look something like this:
Having a time series for conversion This is turning into a pretty significant metric type! |
Yes to all the different subtypes! In particular, the time based ones with options like P95/min/max open a wide array of metrics like page performance, customer service SLAs, etc |
Okay! Thank you both for all the feedback! One more thing... Retention Querying
Here is the spec after all of those features:
There is a ton of optionality in there which leads to a significant number of params but I would not expect these all to be used at the same time. As an example a simple conversion metric would look like this:
And a much more complicated metric might look like:
One small note on Funnels - @tlento and I had a chat about funnels, and we think conversion metrics are a lower-level abstraction. Ultimately this gives tons of control over what you build, but it may not be as simple and easy as just defining a funnel and programmatically building a set of metrics for that funnel. this puts us in a good place to add that down the line. |
Also, I'm unclear - does this proposal supports percentile metrics? This is not as urgently needed on our end but necessary eventually. |
Okay! Here is what I'm thinking of in terms of ordering these features: V1 - The Core
V2 - Common Metric Variations
V3 - Additional Control
I added Percentiles separately! Here is a proposed design. Fairly simple. This could be a good first issue or a quick one for our team. #274. |
@nhandel The core makes sense; however, I think V2 and V3 should be swapped in priority because the ability to hold properties constant is very valuable. For example, a metric like 'New product with 1st purchase in 7 days' requires holding the product_id constant |
Noted! We can make that the next feature up after the core work then. |
updates here @nhandel ? |
would love to be able to calculate churn soon-ish and retention cohorts |
Based on where we're at, I think this PR will be up by tomorrow. There were a few tricky parts here that required a few more design conversations with @WilliamDee. Specifically, handling the foreign-foreign joins and the subsequent fan out/deduplication of events and adding support for window functions. We decided that rather than pointing these configs directly at data sources and defining count measures in this metric, we would reuse the existing measure abstraction in data sources. This allows us to enable features we didn't expect to release in the initial version for free. It's also cleaner to introduce fewer new abstractions and reuse the existing measure construction logic. This keeps the spec a bit simpler. So, our new proposal is that the conversion metric spec will look like this initially:
and then evolve into something close to this as we add more deduplication and calculation functionality:
|
Release order:
|
The new finalized spec to be implemented for the initial core of this feature, is now specified here dbt-labs/dbt-semantic-interfaces#210 metric:
...
type: conversion # new type
type_params:
conversion_type_params:
entity: _entity_ # required
calculation: _calculation_type_ # optional. default: conversion_rate. options: conversions(buys) or conversion_rate (buys/visits) + more to come
base_measure: _measure_ # required
conversion_measure: _measure_ # required
window: _time_window_ # optional. default: inf. window to join the two events on. Follows similar format as time windows elsewhere (i.e. 7 days)
constant_properties: # optional. List of constant properties default: None
- base_property: _string_ # required. A reference to a dimension/entity of the semantic model linked to the base_measure
conversion_property: _string_ # same as base above, but to the semantic model of the conversion_measure |
Describe the Feature
A new conversion metric type would be useful. A conversion is when a base event happens and then a conversion event happens for a specific entity within some time range. For example, we might want to measure how often a user(entity) completes a visit(base event) and then purchase(conversion event) with 7 days(time window). This requires a time range and an entity to join on. Today the closest alternative is a ratio metric but that does not include the entity in the pre-aggregated join.
This could be defined using the following spec:
would yield SQL that doesn't look like this but accomplishes the same thing:
A few notes about query parameters:
Would you like to contribute?
I'd love to contribute to design!
Anything Else?
Nope! This would be a stellar feature and metricFlow is designed to make it happen.
SL-1290
The text was updated successfully, but these errors were encountered: