Hey team, Is there a way to add a small ‘conversi...
# ask-questions
b
Hey team, Is there a way to add a small ‘conversion window’ to the activation metric? Say I’m running an experiment on all pages, but want to filter a report by users who saw a product page. The issue is when users land on a product page, since
product_viewed
will almost always be fired before
experiment_viewed
, but GrowthBook expects the activation event to be fired after experiment exposure. If not, this would be a much appreciated feature request
f
These types of timestamp race conditions are fairly common. There are two main solutions. First, if this is a common situation, you could modify your experiment query to subtract a few seconds from the experiment viewed event. This would force it to always have a smaller timestamp than other events on the same page.
Copy code
SELECT
  user_id,
  DATE_SUB(timestamp, INTERVAL 5 SECOND) as timestamp,
  ...
The other solution is to add a negative "Metric Delay" to the product viewed metric. This setting is a little hard to understand, but basically it lets you include metrics from BEFORE the experiment viewed event. This is in hours, so if you set it to something like
-0.02
, it will include metrics up to 1 minute before viewing the experiment. There are some docs about this, but it's for a slightly different use case: https://docs.growthbook.io/app/metrics#metric-delay
b
Fantastic, thanks for the swift response!