User identification is part of the Formbricks Enterprise Edition.
Understanding Identified vs Unidentified Users
In Formbricks, understanding the difference between identified and unidentified users is crucial for effective survey segmentation and targeted feedback collection.Identified Users
Identified users are those for whom specific information has been set, notably the userId. This identification allows for more precise targeting of surveys and a deeper understanding of the feedback provided. When enabled, all information specified by you and all actions are sent to Formbricks. This method is recommended for applications where users are required to log in and will often return.Setting User ID
To enable user identification, call thesetUserId function of Formbricks and pass the user id. The user will show up in the Formbricks dashboard. Use a unique string, like a database ID or a unique email address. You can also anonymize the identifier, as long as it is unique for each user.
Setting Custom User Attributes
Use thesetAttribute function to set custom attributes for the user (e.g., name, plan).
Setting Custom Attributes
setAttribute function works like this:
Setting Custom Attributes
setAttributes function:
Setting Multiple Custom Attributes
Note: the number of different attribute classes (e.g., “Plan,” “First Name,” etc.) is currently limited
to 150 attributes per environment.
Setting User Language
Use thesetLanguage function to set the user’s preferred language for surveys. This allows you to display surveys in the user’s language when multi-language surveys are enabled. You can pass either the ISO language code (e.g., “de”, “fr”, “es”) or the language alias you configured in Settings → Workspace → Survey Languages.
Setting User Language
Logging Out Users
When a user logs out of your webpage, also log them out of Formbricks to prevent activity from being linked to the wrong user. Use the logout function:Logging out User