User management in the Clix SDK allows you to distinguish between anonymous users and identified users within your app. This ensures that push notifications, in-app messaging, and analytics can be personalized and consistent across devices and sessions.
You can check how to use the API in the Clix SDK GitHub repositories for each platform:
By default, when your app starts without setting a user ID, Clix assigns an
anonymous profile. This is useful when users are browsing your app
without logging in.
2
Identified user (after login/signup)
Once a user logs in or creates an account, you can call the User
Management API to assign a permanent userId. This converts the anonymous
user to an Identified User, ensuring continuity of notifications,
preferences, and analytics across devices.
3
User logout
When a user logs out, you don’t need to take any action. Events after
logout are attributed to the last known user. Call reset() only if you
need to fully anonymize the user (e.g., shared devices).
By default, you don’t need to handle logout explicitly. Events sent after logout are attributed to the last known user, which is sufficient for most use cases.If you need to explicitly log users out or track events under an anonymous user (e.g., shared devices where multiple people sign in), call reset(). This anonymizes the user by:
Setting the user ID to null
Clearing the device ID so a new one is generated on next initialization
With an empty user ID and a completely new device ID, the current user appears as a brand new anonymous user in the dashboard. After calling reset(), you must call initialize() again before using the SDK.
// On logoutClix.reset()// On next loginClix.initialize(config: config)Clix.setUserId("user_12345")
removeUserId() is deprecated. Use reset() instead.
// 1. Anonymous user (default)// No userId is set, Clix generates a project-user-id internally// 2. Identified user// After login, set a unique userIdClix.setUserId("clix_user")
You can attach custom properties to a user profile for personalization and analytics. Properties can be strings, numbers, or booleans.Set a single property (async):