Web sdk
User Identifier

User

By default, each session will be created with an anomimous user to maximize privacy protection. End-application can associate session with particular user if you wish to.

Here is a few methods you can use to help with user tracking.

Get Agiflow User information

You can access agiflow user information using below code:

const user = agiflowClient.identity;

Identify user

If you want to easily identify your user in Agiflow using your application user id, use below method:

agiflowClient.identify(
  <YOUR USER ID>,
  {
    ...userData
  }
);

Un-identifid user

If user is not signed-in or signed out, you can set anonimous user with below method:

agiflowClient.setAnonymousId("<YOUR APPLICATION ANONIMOUS USER ID>");

Alias user

Finally, to merge multiple Agiflow users into one user, call alias method. The id and aliasId are from agiflowClient.identity.id:

agiflowClient.alias(id, aliasId);