Hey All, also new to growth book and have an exist...
# ask-questions
s
Hey All, also new to growth book and have an existential question. Let's say we're assigning experiments on our marketing site which runs client side segment code thus always has anonymous ID / user ID values. If we want to create a metric from a table where anonymous ID's aren't stored (like an orders table), can you get away with just using a user id or do you have to create some sort of a mapping where you can pull anonymous id as a column for the metric query?
f
I assume that all ‘orders’ have a user_id? If you have some way to map or join between the two, you can use metrics assigned to either
s
yeah correct, it does - just not an anonymous ID col. the user id's map just fine. just wondering if growthbook always expects the anonymous id col
f
for each metric, you can define which identifiers it has
then, if you define the mappings between any identifiers, you can use them transparently, and GrowthBook will do the joining for you
s
awesome. so essentially, I can just remove anonymous id like so and it should work?
f
correct
if you click ‘edit SQL’ it will tell you what values are required to be returned
s
amazing. great product btw! very cool to have co-founders so active!
f
thanks
s
quick follow up question here. Was able to setup the metric I wanted which is a duration metric on the orders table from our warehouse, however, I can't see the metric as being available for the experiment we want to add it to. In the experiment in question, we're using a different data source to do experiment assignment. Is that the reason why the metric wouldn't be available on this particular experiment or is there a different reason I should look into?
f
The metrics are joined to the database they are pulled from
when you set up the experiment, you choose the database to pull exposure information from, and the metric set is limited to this data source as well