Before you can integrate with MitBotAnalytics, you would need to annotate your ODA with special markers. There are two types of annotations required to support this. For answer intents and in the BotML. Here are the examples for each type


Answer Intents

The answer intents that you want to log into analytics should be prefixed by below string

<div id="intentName" style="display:none">Your Intent Text</div>


Where, "Your Intent Text" would be the text you want it to appear in the analytic dashboard. Keep it short and usually, 3 or fewer words would be ideal.


This will be needed to be done for all the answer intents you need to show up in the dashboard.


BotML

If you are not using answer intent for certain intents then you would need to annotate your BotML. There are two possible situations i.e. with CommonResponseComponent and without that in a regular dialog flow. See the example for each of these:


CommonResponseComponent

 Hot Liquids:
    component: "System.CommonResponse"
    properties:
      processUserMessage: false 
      keepTurn: false
      metadata: 
        responseItems:   
        - type: "text"
          text: "#INTENT_NAME#:Hot Drinks"
          visible:
            channels:
              exclude: "twilio,slack"
        - type: "attachment" 
          type: "text" 
          text: "hot liquids are following ....."
    transitions:
      return: "done" 


In the above example, the part in bold is the annotation required. The exact syntax is important. It must start with #INTENT_NAME#: and then followed by the intent name you want to log.


The visible part is optional. As the Bot Analytics is only for web sdk so you may want to hide this to appear in non web sdk cases such as slack, messenger, teams, twilio etc.


For Other Dialog Flow Cases

If you are not using CRC then below is the way it can be annotated:


Cold Liquids:
    component: "System.Output"
    properties: 
       text: "#INTENT_NAME#: Cold Drinks"
    transitions: {}
  ....followed by actual System.Output