Identify the repeated user of rasa chatbot

Hi all,

Is there any possibility that i can identify the users who are using my chatbot more often.? i can use the conversation id to differentiate if there is more than one user at a time. But i am facing the problem to check if the same user is using my chatbot again.

Thank you

Instead of a random conversation ID, you can use a user’s username, which will stay constant from one session to another

Can you please explain how to create a fixed “Conversation ID” instead of random?

i used this to get conversation ID

conversation_ID = tracker.sender_id

but its random.

You should generate the sender ID in your frontend application.

For example, in the Chatbot Widget by Jitesh Gaikwad, the sender ID is generated like so:

const sender_id = uuidv4();

This will generate a random UUID every time the page refreshes.

Instead, you could do something like:

const sender_id = isLoggedIn() ? getUsername() : uuidv4();

So if the user is logged in, the sender ID will be set to the username, otherwise it will generate a random ID.

Of course, you should build your own isLoggedIn() and getUsername() functions accordingly to your interface.

Hi, Thanks a lot for your reply. is it also possible to identify the user if he s anonymous .And i need to keep a same sender Id even he refresh or close and visit the page in the same browser. I had a thought to get cookies from the front end to identify but im not sure whether its a right approach. and by the way im using “chatbot widget” as my UI

I solved it… I used cookie generated in the front end with the unique id for each browser. So now i can identify the repeated users of my chatbot. I can capture it until the user clear the cookies.

thanks for your heads up :slight_smile:

Good idea :slight_smile:

1 Like