09/08/2022, 3:21 PM
You should set both attributes. When you run an experiment, you choose which attribute you want to use to split traffic.
09/08/2022, 3:22 PM
ok and obviously sometimes the user_id will be null because the user isn't logged in, should I just send a null value to set attributes for that parameter?
09/08/2022, 3:23 PM
Yeah, null is fine. If you choose user id as the attribute for an experiment, it will skip anyone with null (or another falsy value)
09/08/2022, 3:42 PM
so if we want to split traffic on say all users, we'd just split based on the anon_id (which all users have)