Logging user messages to console (botfront / rasa-webchat)

Hello everyone! I have a question that I couldn’t resolve. I want to log users’ messages to the console. While I can log the chatbot’s replies to the console, the same logic doesn’t work with users’ messages.

This is the code I have for the chatbot that works:

function botMessageEvent(e) {
        console.log('the bot said something: ' + e.text);
....
}

.....
onSocketEvent: {
                    'bot_uttered': botMessageEvent,

and

in credentials.yml I have

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered

I tried this for user messages and it didn’t work:

function userMessageEvent(e) {
        console.log('the user said something: ' + e.text);
}

....
 onSocketEvent: {
                    'bot_uttered': botMessageEvent,
                    'user_uttered': userMessageEvent,

Does anyone have an idea about how to resolve this?

I would appreciate your help. Thank you!