I am having an issue in my flutter mobile app wher...
# support
b
I am having an issue in my flutter mobile app where it seems that sometimes when I .identify users when they log in, rudderstack merges my known unique ID with an anonymous ID that occasionally is reused. Because it is occasionally resued, it is causing user clusters to occur in Mixpanel where a handful of different users's events are merged into the same profile. This does not happen with all users, in fact it's just a somewhat small percentage, but still noticeable and causing analytics problems. What may be going on here? Is there a reason Rudderstack would ever generate the same anonymous ID multiple times on different devices for different anonymous people?
m
Hey There! šŸ‘‹ Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Andy, this is not expected to happen. Can you check if there is something common among these users? Like are the using a particular rudder-flutter SDK version or they are using a particular version of your app? Can you provide some samples where one of the following is happening - Users anonymous Id changes abruptly from anon_id1 to anon_id2 and then back to anon_id1 - Users with different user_ids have the same anonymous_id
b
@shy-kite-21035 there is nothing obviously common about the users, i've been looking into it for a few days now. we use rudder flutter version ^2.4.1. The issue seems to be related more to the second thing u mentioned where an anonymous_id may be getting reused and then user profiles keep merging, causing a cluster. as an example,
0cdc4d1d-9203-49da-bddd-6ea779d7665f
seems to be an anonymous id that keeps getting merged with different known IDs. we don't ever assign our own anonymous_id, rudderstack always does that behind the scenes for us
as you can see in this mixpanel data, the anonymous_id is used multiple times in different Merge events, even though the first ID in the array (the known/user ID) is different.
this was happening for a cluster of internal users who test on the same account so i was thinking it was just isolated or related to being on the same account for testing stuff, but then i learned that it is happening to some non-employees too who use different accounts and devices. I reached out to Mixpanel support about this--still waiting on them, but they initially said they don't think the problem is related to people being on the same account and that it may be something with the anonymous_ids i sent above
m
Hi Andy, I think I understand the issue here. This happens when multiple users use the same device. Since RudderStack does not reset the anonymous_id when a user logs out. This is because most of the when a user logs out (or is logged out) the same user is most likely to log back in. However, if this is causing an issue, you can reset() the user on logout in the flutter app. Calling reset with clearAnonymousId set to true will then set a new anonymousId for future events. This may however increase the number of anonymous ids attached to a particular user.
b
@shy-kite-21035 this is still happening for multiple users who are not using the same device I believe—unless you see info on your end suggesting otherwise for this user. Also we call .identify every time a user logs in which is supposed to reset everything I think?
m
So calling the identify method when a user logs in does not change the anonymous_id.
b
@shy-kite-21035 gotcha, i think this is happening for users who are using different devices and don’t know each other
Is there any scenario where you can see our NodeJS backend causing this? (Which uses rudderstack.identify to assign traits to a user)
m
Hi Andy, can you provide the source ids and the destination id?
b
What do you mean by source ID and destination ID?
m
So if you go into the source page on the RudderStack dashboard, you can find the setting tab, which contains the sourceId. Similarly for a destination. I felt that you are using the JS SDK source instead of the NodeJS source and wanted to confirm.
b
Just DM’d you the IDs @shy-kite-21035
@shy-kite-21035 do you have an update here?
m
Hi Andy would it be possible to get on a call for this? You can setup a call here . I see that you do not have a warehouse destination, but would it be possible to get a dump of all such instances for. Mixpanel with as many parameters as possible (minus any PII parameters)?
Hi Andy, what is the source of the NodeJS SDK?
b
@shy-kite-21035 it’s the one I sent to your DMs for both the frontend and backend I believe. Booked a call
m
You shared the Flutter source and Mixpanel destination id.
I am looking for the NodeJS backend sourceId
Is there any scenario where you can see our NodeJS backend causing this? (Which uses rudderstack.identify to assign traits to a user)
b
@shy-kite-21035 we use the same source IDs. (we probably shouldn't have started it out like that but that's how it is set up)
so the flutter ID = nodeJS ID
m
So you are using the Flutter writeKey in your NodeJS SDK?
b
correct
m
But won’t it be simple to create a new source and move it
b
i just learned that we do it this way
we could but probably not a huge priority for us as long as it isn't messing anything up
m
But I feel this could be causing the issue here. It should not take more than 2 minutes to setup the actual source and connect it to the destination. Finally you just update the writeKey in your code.
b
Ok i'll ask someone to do that
m
Thanks. We can revisit this if the issue persists
šŸ™Œ 1
b
cool thanks we can cancel the calendly call i set up tomorrow for now
m
Lets keep the meeting for now. It could be like a meet and greet. We can finish up in 15 mins.
b
sounds good
m
Hi Andy, I have added a member from my team to the call and so would it be possible to walk us through the issue you are facing on the call?
b
Sure that sounds good
@shy-kite-21035 i think i've found the gist of what is happening as i've looked into it the last hour: • the merged profiles seem to be from a group of fraudulent "users" coming from the same area in Georgia. ā—¦ this means they are logging out and creating new accounts from both the same device, and logging into the same account from different devices. dumping some timeline notes i took here:
Copy code
First user ID to be a part of 64fda19d357f7d4dd5b75170 clump:

64f994ee90d83592d698984e on Sep 9th with anonymous ID 29cb13c5-462f-4006-88c9-b3a08f9

Different user installs the app on Sept 10th:
User ID 64fda19d357f7d4dd5b75170 and Anonymous ID b732d1e6-2b66-40ed-b7fd-b52974300d5d

These have not been merged yet, although they will be later.

Then on Sept 12th, user with User ID 65007b17e50683a2f82494e9 and anonymous ID 1ae12616-9e99-4c91-8704-6a131628 come in. Still, nothing has been incorrectly merged yet.

Also on Sept 12th, user with User ID 650081236aa1dee25ba77dfa and anonymous ID 57d75876-38e8-4e71-8b1f-a2ae2afc come in. Still, nothing has been incorrectly merged yet.

———— 


On Sept 13th, user with User ID 650232303e0ad5d60208fa67 and anonymous ID 072f97a9-ef9b-49e2-be77-e5b1204 come in. Still, nothing has been incorrectly merged yet.

Also on Sept 13th, user with User ID 65025cc63e0ad5d60209396a and anonymous ID f958e602-ec69-4c07-91a7-b62ca841f278 come in. Still, nothing has been incorrectly merged yet.

Then on the 13th comes user ID 64ffa59355171e0103c795bb and anonymous ID f958e602-ec69-4c07-91a7-b62ca841f278. THIS IS THE FIRST SIGN SOMETHING IS WRONG. The anonymous ID of the 2 users above are the same even though the user IDs are different.

I looked into the data and both of these users were rejected at KYC and entered in the same address. This implies that it was actually the same person working from the same device.


At one point, eaf61e51-e816-4811-8a3c-27741aa9e gets merged with 64fda19d357f7d4dd5b75170. 





——

Common thread:
- MOST IMPORTANT CONCLUSION: Same device or same account on different devices
- Near Atlanta, Georgia
- I think iPhone
The conclusion that profiles are getting merged when people access multiple accounts on the same device or the same account on multiple devices would also explain why all the Fizz employee accounts are getting merged since the way we test the app is we all log in to the same account from our own device. How do you recommend we fix this? Essentially I think we will want to ensure that when someone logs out of an account on a device, that anonymous ID does not get carried into the next login attempt on that device. For context on how we do it now, we call Rudderstack .identify when a user logs in, which I think was supposed to clear any anonymous user ID but I could definitely be wrong
m
Hi Andy, so I realised that the best way to resolve this issue is to do the following - Manage the current user_id on the device in the app state - If the user_id changes on login, then you should call the code below and reset the anonymousId `rudderClient.reset(clearAnonymousId: true); `⁣The above will set a new anonymousId for the user - Update the user_id on the device - If the user_id does not change there is no need to do anything Note:- I am using the user_id loosely but it can the client email as well
b
Gotcha, can we call the reset function every time on login rather than keeping track of if it’s a new user?
m
Yes. That is correct
b
Thanks! Will try that