Chatbot - Identify User
Provide user information to the Chatbot
You can identify a user by providing user information to the Chatbot. This information can be used to personalize the Chatbot's responses or to track user interactions.
<ab-chat
chatbotID="YOUR-CHATBOT-ID"
userID="a64427d6"
username="John Doe"
email="john@doe.com"
profileImageURL="https://cdn.some-page.com/profile-sm.png"
referenceID="a738d158892b"
></ab-chat>
You can find an explanation for each field in the Chatbot Reference.
Collect user information from the Chatbot
If you do not have access to user information (such as name or email), you can enable data collection in the chatbot configuration. This will prompt the user to provide their name and email before starting the conversation.
Once the user provides their information, they self-identify, which is the equivalent of providing the information manually.
<ab-chat
chatbotID="YOUR-CHATBOT-ID"
username="John Doe" // <-- This will be added by the user
email="john@doe.com" // <-- This will be added by the user
></ab-chat>
This user information is now available in the chat history of this conversation and can be found through the Aidbase dashboard.
You also have the option to collect the information through webhooks or through a callback function.