Is it possible to create a custom user event on Freshchat widget?

Hello Community,

Does anyone knows if there is a messenger event triggered on the frontend of the Freshchat Widget every time when the customer sends a message? The closest I have found in documentation is user-events, but it is pretty unclear how a custom user event can be set.

Has anyone used this feature before? any ideas how this feature can be used?

Many many thanks!!!

Hi @shan you can use the below events to listen to messages sent from the Freshchat Widget and received to the freshchat widget.

Listener for new message is sent from client

window.fcWidget.on("message:sent", function(data){
console.log("Message sent --->", data);
});

Listener for new message is received to client

window.fcWidget.on("message:received", function(data){
console.log("Message received --->", data);
});
4 Likes

Hi Arjun, is there a way to set a custom event over a click over a TOPIC?
somthing like:
window.fcWidget.on(“topic[‘myTopicName’]:click”, …

I need to intercept a click over a specific button to do other activations over my website