0
votes

Technology :-

Nodejs Sdk for bot builder version 3 I have chat bot with MS teams and Cortana channel

I am trying to see if there a way to capture what buttons user has click on the adaptive card being presented . Most likely I am interested on text on the button so I can run some analytics.

My card has a button with "type": "Action.ShowCard", something similar to this sample https://adaptivecards.io/samples/ActivityUpdate.html

where let's just say I want to capture of user click on 'Comment' & 'Set due date' buttons.

1

1 Answers

1
votes

If you followed - https://docs.microsoft.com/en-us/adaptive-cards/getting-started/bots - https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-rich-cards?view=azure-bot-service-3.0

You won't see an obvious answer. The renderer handles showcard. But - for analytics you can use an Action.Submit. Your bot will get a Value on the message. You can then do your analytics, and show another card with a different layout.

Also, you might be able to use "a tracking pixel" approach (don't know, haven't tried), or implicitly gather stats if any of the stuff on the shown card is interacted with (that would come through as message text or value).