https://www.growthbook.io/ logo
#announcements
Title
# announcements
g

green-jordan-83609

09/14/2022, 9:03 AM
Hi team, I found something weird in the metric conversion time queries generated by GrowthBook (it might just be I’m not totally understanding it): Let’s say I define a metric with
Conversion Delay = 0
(i.e. I want all the metrics with
metric.timestamp
>=
experiment.creation_timestamp
to be included in the query) and with
Conversion Window = 72
(i.e. I want to keep just the metric entries with
metric.timestamp
<=
experiment.creation_timestamp + 72 hours
). There is a point in the query, where happens this:
Copy code
__denominator0 as (
  -- Metric (metric name)
  SELECT
    user_id as user_id,
    1 as value,
    m.timestamp as conversion_start,
    m.timestamp + INTERVAL '72 hours' as conversion_end
where this
m
table refers to the metrics table, therefore
m.timestamp + INTERVAL '72 hours'
will be 72 hours after the metric timestamp, rather than the
experiment.creation_timestamp
. I think the logic is still working fine, but I’m not sure if this calculation is properly defined. If it helps, the code is: https://github.com/growthbook/growthbook/blob/3ca3d6ec5e0ac4451b088ff6d399fa2f2cecf268/packages/back-end/src/integrations/SqlIntegration.ts#L6[…]709 Many thanks and please let me know if something I’m saying is wrong or my assumptions are not correct!
f

fresh-football-47124

09/14/2022, 9:15 AM
I know we have a project in the works to make this conversion window a bit more logical - @future-teacher-7046 should be able to explain what you’re seeing
f

future-teacher-7046

09/14/2022, 12:12 PM
The SQL is a little confusing. There could be a long sequence of events before the actual goal metric you care about. Viewed Experiment -> Activation Metric -> Denominator Metric -> Goal Metric. Each of those metrics have their own conversion windows. The conversion start/end columns are actually meant for the next metric in the sequence. So your example is looking at the Denominator Metric. The start/end columns are defining the valid range for the next metric, your Goal Metric. In other words, the Goal Metric must happen within 72 hours of the Denominator Metric.
g

green-jordan-83609

09/14/2022, 12:20 PM
I see, the logic gets quite complicated with those steps. Now I think I understand it. Basically, my denominator metrics is a binomial, using the same event timestamp than my goal metric. And my Activation Metric is the same as the Viewed Experiment (as I’m not setting any conversion delay). Therefore, what GrowthBook is actually doing is just calculating that the goal metric timestamp (which is the same as the denominator) falls within the 72h after the experiment event datetime. Is this reasoning correct? Thanks for the answer and sorry for the misunderstanding
f

future-teacher-7046

09/14/2022, 12:39 PM
yes, I think that sounds correct.
🙏 1
13 Views