What’s the lowest negative conversion delay that c...
# ask-questions
s
What’s the lowest negative conversion delay that can be set on a Fact Table Metric ? It seems like 15 minutes, but I’m also setting it based on a proportion of an hour rather than directly setting the amount of minutes.
r
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
f
I’m not sure there is a limit
r
Hi Andrew, just checking in on this. Do you still need assistance?
s
I think the minimum ends up being -0.13 hours (8 minutes), anything lower and it gets rounded down to 0. For context, we’re using Snowplow to back our analytics and event tracking, we’re seeing cases where the experiment exposure event is being recorded after the page view so we’re using a negative conversion delay to sort this out. We’ve already determined the user is in a experiment at this point and actually served the experiment but the actual tracking event is late by milliseconds (even though we fire it prior to the page view, Snowplow issue it seems). Ideally we’d like to set a smaller negative delay or, more correctly, lookback window. We really only need to look back for a few seconds, on the minutes we could be leaking metrics from actual pre-exposure states. A way that could solve this would be considering the session ID that Snowplow attaches to events to group events to a single session so something like this?
Copy code
__userMetricJoin as (
    SELECT
      d.variation AS variation,
      d.dimension AS dimension,
      d.anonymous_id AS anonymous_id,
      (
        CASE
          WHEN m.timestamp >= DATETIME_SUB(d.timestamp, INTERVAL 5 MINUTE) AND m.session_id = d.session_id THEN m.value
          WHEN m.timestamp >= d.timestamp THEN m.value
          ELSE NULL
        END
      ) as value
    FROM
      __distinctUsers d
      LEFT JOIN __metric m ON (m.anonymous_id = d.anonymous_id)
  ),
sorry for the tags @fresh-football-47124 @brief-honey-45610 but are there any thoughts on the above?
f
can you set it to -1?
@future-teacher-7046 thoughts? ^
s
-1 would make it an hour lookback but we want to make the lookback as small as possible to minimise pre-exposure coverage whilst also accounting for weird Snowplow event timing issues
f
One option is to change your experiment assignment queries in the data source and subtract a second or two from the timestamp column. Then you wouldn't need to do anything in the metric definitions.
Copy code
SELECT
  DATEADD(second, -1, timestamp) as timestamp
👀 1
s
Genius! That is much easier to implement! Doesn’t lock down the session though, but that’s fine if we can at least have the lookback to this level, thanks!
🎉 1