Handling anonymous and identified users in the client and on the server
When working with anonymous users, analytics SDKs automatically assign anonymous user ids on a per-client level.
When a user is identified the anonymous events are associated with the identified user.
You don't need to do additional actions for this logic to work on the client side, so you are not required to provide
Client side Analytics SDKs can store the information about the currently logged in user. It makes possible to identify user once and then send all subsequent tracking calls on behalf of the identified user.
To make an Avo function identify a user you add the Identify action to the corresponding Avo event in your tracking plan. Learn more about the Identify action.
Codegen corresponding to the events with Identify action will require a userId parameter automatically.
Server side Codegen does not have a way to maintain user identity.
That's why if you want to associate events with particular users before they identify, you need to pass the
anonymousUserId string parameter to your Codegen.
anonymousUserId parameter is available on demand in all server languages, contact us if you need to use it and don't see it in your Codegen.
Given the server side functions can not maintain user identity, once the user is identified you still have to provide the
userId with every function call.
userId parameter is automatically required in all the server side Codegen functions.
The Identify action does not change the server codegen functions. Every single function is effectively an identify function, because you need to provide user id all the time.
userIdare optional make sure to provide one of them to be able to identify the user.