-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I set UserInfo anonymousId? #233
Comments
hi @nwagu , you can do this via a plugin. please refer to this comment for example. if you'd like the anonymousId to stay once
|
Thanks, I did not know I could do this. But then this solution only modifies events, it does not change the actual userInfo, so calling something like |
@wenxi-zeng could you please review my PR and see if it can be merged? It would be more convenient for us to set the anonymousId directly instead of using a plugin |
hi @nwagu sorry for delayed response. I have brought this to our team. the
|
Okay. Could I get more info (maybe link to a doc) about what the anonymous id is used for in the backend? This is just so that I am clear what overwriting it implies @wenxi-zeng |
@nwagu one of the known use case is de-duping on backend. changing the anonymousId might not have any impact since we do have customers doing it via plugins and we hear no complains so far. we just have to be very cautious on making this change, since it's a public API and we need to evaluate the potential risk. |
Describe the bug
I would like to set the anonymousId for a user, preferably when calling
identify
, but there is no overload of that method that allows this. Is there any other way to do this I am missing?I have considered setting this in the EnrichmentClosure, but this only changes the anonymousId for the identify event. Other events still contain the random anonymous id generated internally by this lib.
To Reproduce
n/a
Expected behavior
I should be able to set anonymousId for a user from the client.
Screenshots
n/a
Platform (please complete the following information):
Additional context
n/a
The text was updated successfully, but these errors were encountered: