Want to know more about analytics for your bot?

Introduction

Using Analytics, an extension of Azure Application Insights, you can easily gain knowledge about number of users communicating with the bot and number of messages exchanged with the bot. As a result, you will understand the impact made by your bot, whether something needs to be changed to drive more usage or is the existing infrastructure good enough to support traffic.

Enable analytics

The bot analytics functionality is available through Application Insights and can be enabled in 4 simple steps.

Bot developed using .NET or Node.sj

If your bot was developed using Bot builder SDK for .NET or Node.js and deployed on Azure, follow the steps below.

  1. Login to Azure portal and create Application Insights resource.

  2. Make a note of the Instrumentation Key from the Application Insights resource

  3. Make a note of APPLICATION ID. Click on Create API key, enter short description, select Read telemetry and click Generate key button. Make a note of API Key.



  4. Open the bot in the Bot framework Developer portal (https://dev.botframework.com/bots/settings?id=YOUR_BOT_ID). Click SETTINGS and scroll down to the Analytics section. Enter Instrumentation Key, API Key and Application ID as follows.

Bot developed using Azure Bot Service

If your bot was developed using Azure Bot Service, analytics is enabled and configured by default. You can just go to the next section.

View analytics

After configuring analytics for the bot, Application Insights will start collecting data. To view analytics, open the bot in the developer portal and click ANALYTICS.

Customize Channels

Specify the channels that should appear in the graph. Note that if your bot is not enabled on a channel, there will be no data from that channel.

Specify time period

Configure the time duration for which the graph should display the data.

Users and Messages

Keep a count of the total number of active users and messages sent and received during the specified time frame.

User Retention

Track how many users have messaged again.

That’s it!

With these simple and easy steps, you can now start tracking your bot analytics.