This message was deleted.
# announcements
w
This message was deleted.
f
Like you said, there's a tradeoff. If you always use logged out key, you lose cross-device tracking, but the user will never switch variations while they are on a single device. If you always use logged in id, then you can track across devices, but anonymous users won't be included in experiments at all. If you do a mashup then users will switch variations when they login. There's no great solution and it depends on the specific experiment. I tend to avoid doing mashups where the id could be either logged-in id or anonymous key. If the experiment is going to include a lot of logged out users, then I use an anonymous key. Otherwise, I use a logged-in id (which excludes anonymous users from the experiment completely).
So what that means in the SDK is that anonId is always set to the anonymous device id. And user_id is either null or the logged-in id.
And then on a per-experiment basis you decide if you want to use user_id (the default) or anonId for assigning variations
Some experiment are obvious (e.g. testing the login flow should be using anonId, testing the account info page should be using userId). For the less obvious experiments, you need to decide if cross-device tracking is more important or if including logged-out users in the sample is more important.
p
sorry! I didn't say thank you... so thank you! was very much knee deep in a refactor of all of this code
hey @future-teacher-7046 so i've just realised its more complicated than I initially thought? First we have to select whether to use the
user_id
or
anonymous_id
to put them in the experiment... but presumably we have to then make sure we fire the goal using that same ID? Or are you guys able to check the Mixpanel profile of the user and check the ID's? I'm trying to avoid needing to put a second event "Completed experiment goal XYZ" with the specific anonymous_id/user id
f
Mixpanel events track both anonymous and logged in ids for events. On the analysis side you choose which event property you want to use for grouping.
p
yep - worked it out. Apologies, someone changed something our end that slipped through. We'd stopped connecting anon ids <> user id's
151 Views