Kik ❤️ Botmetrics
Originally posted on Medium
The Kik Messenger platform is a pioneer in the messaging and conversational UI space. With more than 20,000 Kik bots and over a billion messages being exchanged with bots, it becomes even more important to think about analytics and engagement for these bots.
Integrating Botmetrics is an easy two step process — the first is the Kik middleware module that instruments your Bot with a few lines of code and the second is the Botmetrics service which analyzes, visualizes and lets you act on the metrics collected.
Let’s get started!
Part 1: Adding Analytics Middleware to your Kik bot
- Install the middleware using npm
- Instantiate it in your code with three environment variables:
- BOTMETRICS_BOT_ID that uniquely identifies this bot.
- BOTMETRICS_API_KEY that ensures that only you can send metrics for your bot.
- KIK_USERNAME is the username of your Kik bot.
3. Use the middleware in your bot by adding it to your bot.use() function.
A more detailed example is available here.
Next let us setup the service and get the values we need for the two environment variables we created.
Part 2: Connect to Your Botmetrics Analytics Service
- Sign Up to Botmetrics.
- Log On onto your instance. Setup you Kik bot by adding your bot’s “Kik API Key” and “Bot username” to Botmetrics.
3. Now, finally, set the BOTMETRICS_API_KEY and BOTMETRICS_BOT_ID environment variables in your Bot’s environment based on the values in the settings page and restart your bot!
Restart your bot and you can now instantly see detailed metrics about your customers such as new and active user growth, demographic and geographic distributions, and user action attributes.
In addition, with no engineering effort you will also have the ability to segment users based on these characteristics and send them targeted smart time-zone aware notifications. All while maintaining the privacy and control over user communications.
Join the Community
Your questions, contributions and feedback about the middleware or the service are always welcome on Github and you can also join our community on Slack.
☞ We read every response on Medium or reply on Twitter, so don’t hesitate to let us know what you think.
☞ Get a weekly newsletter of the best Bot & AI news: Sign up for botweekly.
☞ Please tap or click “︎❤” to help to promote this piece to others.