Tracking conversations with Botkit and Keen IO

Nima Gardideh
Jan 11, 2017 · 3 min read
Image for post
Image for post
Botkit analytics, powered by Keen IO

Open-source middleware to track bot metrics with Keen IO – check it out here and read about the motivation below 🚀

This post is part of a series of open source projects that I’ll be releasing in the next while, as described previously here.

Bot Analytics

One of the things that we had to deal with when we were building Suto was that the traditional “session”-based analytics systems (like Google Analytics) didn’t really work. Even the pure “event”-based analytics systems (like Mixpanel) were too prescriptive for a new medium like chat interfaces.

We wanted to answer slightly complicated questions like “What type of questions are these set of users asking?” or “How many times are these users starting conversations with us?” without having to do too much work to get those answers on a dashboard.

We definitely didn’t want to build our own analytics stack, since I knew that it takes a small village to get it right given my experience at Taplytics.

So we decided to outsource this task to Keen IO, a flexible and scalable analytics platform that I had used before. It turned out to work out very well – we were able to put together a great dashboard together in about a day and as we grew to other channels (like Email and Facebook Messenger), we were able to track everything in one place.

So today, I’m open-sourcing a small library that I originally built to pass data from Botkit to Keen IO. It enabled us to have a decent view of the usage of our bot (which we decided to shut down a few weeks ago, a story for another time) in the hope that it helps others :)

Keen IO Botkit Middleware

I’ve become a big fan of Howdy’s Botkit framework. It’s a great abstraction over the different ways you can create a bot and gives you enough customization capabilities to make things easier.

A great example of this is their middleware functionality that lets you listen (and/or modify) the incoming and outgoing messages. Which is exactly what I used to track messages going in and out for our bot.

I’ve abstracted this in an open source library called keen-botkit.

I’ve been hesitant to share it since we’re no longer working on our bot, but Keen graciously offered to maintain the project (which is why it’s on their Github now), so I feel comfortable with having others use it and take advantage of having better analytics for their bots.

If you already have a bot or are about to work on one, check out Keen IO for Botkit and start tracking its usage right away ⚒️

If you’d like to keep up with my open-source releases over the next while, be sure to follow my posts or subscribe here.

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMI family. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.

If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!

Image for post
Image for post

HackerNoon.com

#BlackLivesMatter

Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Nima Gardideh

Written by

I help companies grow with art and technology at Pearmill. https://pearmill.com

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Nima Gardideh

Written by

I help companies grow with art and technology at Pearmill. https://pearmill.com

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store