https://www.growthbook.io/ logo
c

colossal-branch-66295

08/13/2023, 8:04 PM
Hello, Could anyone please help me out with the following problem? I have a question about metrics for experiments. Let's say I have 10 experiments and 1 metric. In each experiment I use this metric. How can I adapt it to all experiments? I don't want to change the sql query for each experiment in this metric and then revert it back. I don't want to create 10 versions of this metric either. My best method consists of: 1. at the start of the experiment, create a new column in the metric table with the name "{NameExp}"_Metric1 2. fill it with values during the experiment 3. when viewing the experiments, change the "{NameExp}"_Metric1 as value column in select Can you tell me how to do it more optimally? Thanks!
f

fresh-football-47124

08/13/2023, 10:54 PM
Why do you need a separate metric per experiment?
c

colossal-branch-66295

08/14/2023, 8:27 AM
Parallel experiments write metrics to different database columns, one metric targets only a specific column. Because of this, I need to manually correct the sql query for each experiment. Can this be improved somehow?
f

fresh-football-47124

08/14/2023, 8:50 AM
metrics are designed to be joined to a user, and then from that user, joined to the experiment they saw
in that way, there is no need to pass around the experiment they saw to the event in question - if that’s what you’re doing
c

colossal-branch-66295

08/15/2023, 9:03 AM
Thank you!