GithubHelp home page GithubHelp logo

maheshsundaramurthy / botkit-middleware-botmetrics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from botmetrics/botkit-middleware-botmetrics

0.0 1.0 0.0 13 KB

Botmetrics Middleware for Botkit

JavaScript 100.00%

botkit-middleware-botmetrics's Introduction

Botmetrics Middleware for Botkit

Botmetrics is an analytics and engagement platform for chatbots.

Installation

Add botkit-middleware-botmetrics to your package.json

$ npm install --save botkit-middleware-botmetrics

Usage

Register your bot with Botmetrics. Once you have done so, navigate to "Bot Settings" and find out your Bot ID and API Key.

Set the following environment variables with the Bot ID and API Key respectively.

BOTMETRICS_BOT_ID=your-bot-id
BOTMETRICS_API_KEY=your-api-key

Require botkit-middleware-botmetrics and use the middleware in your bot like so:

require('botkit-middleware-botmetrics')({
  botmetricsBotId: process.env.BOTMETRICS_BOT_ID,
  botmetricsApiKey: process.env.BOTMETRICS_API_KEY,
  controller: controller
});

Slack

For a detailed Slack example, look at examples/slack.js.

Set the appropriate environment variables SLACK_BOT_TOKEN and then run `node examples/slack.js).

Facebook

For a detailed Facebook example, look at examples/facebook.js.

Set the appropriate environment variables PAGE_ACCESS_TOKEN and VERIFY_TOKEN and then run `node examples/slack.js).

Setting your API Host (for Self-Hosting)

If you are using your own self-hosted version of Botmetrics, remember to set the BOTMETRICS_API_HOST environment variable to your host (If you have hosted your Botmetrics instance at https://my-botmetrics-instance.herokuapp.com, set BOTMETRICS_API_HOST to https://my-botmetrics-instance.herokuapp.com.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/botmetrics/botkit-middleware-botmetrics. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

botkit-middleware-botmetrics's People

Contributors

arunthampi avatar vlad-shevtsov-mev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.