We are excited to announce User Aliasing, a new feature designed to eliminate the headache of managing temporary user IDs and ensure a consistent experience for all your users.
Previously, when a user hadn’t logged in, our FE SDKs required you to generate a random temporary ID for them to ensure a consistent experience. This meant you had to persist that random ID even after the user logged in and a genuine ID was available, creating an unnecessary burden on your development team.
The solution: User Aliasing
With User Aliasing, we remove this friction. Your team can now:
- Use a random temporary ID (the `aliasId`) for anonymous users before they log in.
- Once the user logs in and their actual userId is available, simply call our new method to map the two IDs together.
This simple mapping ensures that no matter which ID is used after login, the temporary one or the actual one, the user will get the exact same experiment variation decision as before.
Benefits
- Consistent Experience: Ensure a seamless and uninterrupted experience for your users as they transition from anonymous to logged-in states.
- Accurate Reporting: VWO reports will recognize the temporary ID and the permanent ID as the same user, leading to cleaner, more reliable data and metrics.
- Reduced Development Effort: No need for complex logic to manage and persist temporary IDs across sessions.
Crucial requirement- Gateway service
The Gateway Service is required to use User Aliasing. The Aliasing API (like setAlias()) depends on Gateway endpoint logic to reconcile multiple user IDs reliably.
How it works
To enable this feature, simply pass the `isAliasingEnabled` flag during SDK initialization:
Javascript
vwoClient = await init({
accountId: '123456',
sdkKey: '32-alpha-numeric-sdk-key',
gatewayService: {
url: 'http://your-custom-gateway-url',
},
// Required to use Aliasing
isAliasingEnabled: true,
});
Once the user has logged in, and their actual userId is available, call the setAlias() method to do the mapping.
vwoClient.setAlias(userContext, 'aliasId');
That’s it! User Aliasing takes care of the rest, ensuring your users are consistently bucketed and accurately reported.
Get started with user aliasing today
User Aliasing is now available in the latest Mobile and server-side SDKs. Upgrade your SDK to the latest version if you haven’t already, and start delivering consistent experiment experiences across your mobile app. Also, feel free to book a demo to understand this feature from our product experts.









