Hello all, I have a question about metrics and id...
# ask-questions
n
Hello all, I have a question about metrics and identifiers. I have 3 identifiers: experimentation id (exp_id), GA4_id, logged-in ID (user_id), and the relation between them is usually one to many from right to left, i.e. a logged-in user can have multiple GA4_id and a user with GA4_id can have multiple experimentation id. I have one metric defined in fact table that has user_id and GA4_id as user identifiers. I am doing the analysis for an experiment on exp_id and want to use the metric in the fact table with the join with exp_id <-> GA4_id, but for some reason the queries that GrowthBook uses gets the metric with the exp_id <-> user_id join. Does anybody know why is this happening? or how to control it? I tried to re-order the columns in the fact tables or the join query, but nothing changed.
f
Hi Ahmed, One, we don't recommend having ids that are that invariant. Two, metrics define what identifiers they return (you set this). If an experiment is set to do analysis on an identifier that is different from one that the metric is returning, then we'll use the idenfitier joins, which is defined on the data source page
n
Hi Graham, thank you for your response. I think we need at least two identifiers (for guests and logged-in users). The third one was needed for some targeting conditions. You were right I can set the identifiers with metrics, and I realized that this should be the only correct way to conduct analysis. The issue arises, however, from having metrics that uses two identifier, but the the analysis is done on a third identifier. Then, as you said, you will use the identifier joins and here we have inconsistency, it uses one metric identifier, e.g. exp_id <-> GA4_id, with one metric and uses another identifier, e.g. exp_id <-> user_id with another metric. I agree with you now that this is considered a misuse of the identifiers, but wanted to clarify it here anyway. Thanks again and have a great day!