Hey, i have configured two metrics, time to add to...
# ask-questions
i
Hey, i have configured two metrics, time to add to cart and time to purchase. But i am not able to see data for these in my experiment. I checked the metric definition, it is completely correct, with event_name correct as well. What might be going wrong here?
h
Did you test the query first and it worked?
i
Can i test the query in growtbhook itself? Or will I have to run it on my database?
h
When you setup a metric in growthbook you can test the query at the top left corner before submitting it. Did you do that? And if so did you get any results?
i
Not able to find this option while creating or editing a metric
wait nevermind, found it in the query builder. Thanks, i'll check and get back
h
Great! If you get results, save the metric and once in the metric you can also run an analysis to see the data over time
i
When i chose query builder, the query automatically changes. Hence, not able to test the query which i want to use in the metric and believe is correct
testing the query with relevant columns selected, gave me a results. But it was not the relevant query for that metric i was defining.
h
What metric are you trying to define? How is the information stored in your BQ table?
f
you'll likely want to write the SQL for something like this
if the metric works fine in the metric page
but not in an experiment, there are usually two reasons
one is that the metric event(s) don't all happen after the exposure event (or within the window defined)
i
i am trying to define Time taken to add to cart for a user. its defined basis event_name = add_to_cart. This configuration works for a binomial metric, but not for a metric defined for time.
f
the other is that the randomization unit is different between the metric and experiment, and the unit join query is incorrect
what do you mean by not working? no data at all? errors?
i
no data at all
Let me try writing the query. Have been using default query created by growthbook