Getting button onClick event using event listener in v1 widget

Hi team.

Is there any way we can get an event if user clicking a button either a Quick Reply or Card button using event listener for v1 widget?

Currently we’re using this script to get the event, but it not getting any event when user is clicking the button in v1 widget. For v2 widget we are able to get the event (shown in image 1) and in v1 widget shown in image 2

window.addEventListener('message', function (eventData) {
        eventData = JSON.parse(eventData.data)
        console.log("MESSAGE eventData: ", eventData); 
        })


Don’t make any comparison between V1 and V2.
V2 is having more Functionality and feature which might not available in V1.

Please let us know the problem statement, We will check and get back to you

Problem statement:

  1. Bot use carousel and open url directed to link
  2. in V2 widget we get ym_event_card_action event code.
  3. We are about to use this event to be used by the client for a custom behaviour of url access clicked within the client’s mobile SDK app

In general this will be the goal of our question. Is there any insights or a way on how to achieve this using v1 widget? Thank you

hi @Shweta_Kumari any insights for this?

cc: @akshay_bhat

We don’t have this feature presented for v1, Can you please use v2 widget for this?

1 Like