https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
q

quick-fireman-78128

05/19/2022, 12:57 PM
Hey, am I correct in understanding that the id set as attribute in the growth book application does not have (and does not need to have) any connection to the user_id used in analysis/data source. And that the minimum implementation of user attributes is just an attribute for unique id, like
Copy code
new GrowthBook({
  attributes: {
    id: "iowsho98291nx"
  },
});
?
f

future-teacher-7046

05/19/2022, 1:39 PM
That's correct that it doesn't need to be the same as analysis, but it's a good idea to keep them the same if possible. Otherwise, you may end up with multiple exposures (a single user in analysis being assigned to multiple variations). We detect that automatically and remove those users from the analysis but it's better to avoid if you can.
q

quick-fireman-78128

05/20/2022, 11:46 AM
Right, that’s good to know that you remove those users! In our case we are going to use a user id that is set early (server) and that has a long lifetime. We won’t send that id to google analytics for GDPR reasons. So that means because we can rely on your deterministic assignment of variations the same user/device will see the same variation even if they might become multiple users in GA.
f

future-teacher-7046

05/20/2022, 11:50 AM
Yep, that should work. You might get the opposite problem where a user is counted multiple times in an experiment if their GA id is reset. We have no way to detect that automatically in the data unfortunately.
q

quick-fireman-78128

06/01/2022, 12:56 PM
Hi. I am getting feedback from the legal team around the id we want to use for GB. Could the id actually be something that is only kind of unique. As in for example a three digit number (giving 1000 possible combinations). Would that still work for the deterministic assignment?
f

future-teacher-7046

06/01/2022, 1:22 PM
That would work, although it might add a little noise to the data when you go to analyze results of experiments. The attributes you pass into the SDK are never sent over the network and never touch the GrowthBook servers, if that changes anything from the legal perspective.
q

quick-fireman-78128

06/02/2022, 5:55 AM
Right. In analysis we would use a different id (using GA4 so the ga client id is proposed to be used). I understand the combination of growth book id + experiment key is always going to produce the same variant assignment. The way we want to implement the cookie for growth book id that id will always have same or better retention than GA cookie. So from this, in what way might we produce more noise by having the growth book id being let’s say even a two digit number?
f

future-teacher-7046

06/02/2022, 1:41 PM
If the Google id changes, but your cookie does not, the person will be double counted in results. Probably not a huge deal, since that's likely a rare edge case.
7 Views