Botanalytics Middleware for Microsoft Bot Framework
Botanalytics is an conversational analytics&engagement tool for bots.
Installation
Add botanalytics-microsoftbotframework-middleware
to your package.json
$ npm install botanalytics-microsoftbotframework-middleware
Usage
Register your bot with Botanalytics. Once you registered, please find your token at the integration page or navigate to Settings to see your token.
Set the following environment variable with the Token respectively.
BOTANALYTICS_TOKEN=your-botanalytics-token
Require botanalytics-microsoftbotframework-middleware
and use the middleware in your bot like so:
// Initialize the middlewarevar BotanalyticsMiddleware = ; // Initialize the connector and the botvar connector = appId: processenvMICROSOFT_APP_ID appPassword: processenvMICROSOFT_APP_PASSWORD;var bot = connector; // Use the middlewarebot;