Updating the user ID
User IDs are important for Frigade to keep track of your users. If you don’t provide a user ID, Frigade will generate a guest user id for you. User IDs can be provided at time of render in the<FrigadeProvider /> component or at any time using the setUserId method:
setUserIdWithProperties method:
Adding user properties
Tracking events for the user
Standardized fields
When setting user properties, Frigade automatically detects and stores the following fields on the user:firstNamelastNameemailorganization
Linking a guest session to a user
Frigade will generate a guest user ID for you if you do not provide a user id. This ID is stored in the user’s browser usinglocalStorage.
This allows unauthenticated users to have state in Frigade Flows and to be able to continue their session when they return to your application.
Often it is useful to link a guest session to a user when they register or log in and transfer all state and data. The linkExistingGuestSessionToUser(userId: string) method enable this functionality for you: