Right now our #1 goal at Keen IO is to get developer feedback on our product. We don’t simply want people to go to our site. We want them to really engage with our API, so we can get detailed advice on how we can make it better.
I wanted a way to count of the number of “engaged developers” so we could measure our progress toward our goal. I came up with a loose definition of “engaged developers”: organizations that have created their own event collections, sent events, AND run analysis queries on those events. Here’s how I built the query to count that:
1. We have an event collection that records every time someone makes an analysis API call. We record the type of analysis query (count, extract, average, etc), the details of the query, and other relevant information, such as the organization and project being queried. We record as much contextual information about every event as we can, because that opens up a lot more segmentation and analysis capabilities later.
2. To build my analysis query on this event collection, I started with a “count unique” of all the organizations represented in it. This is essentially a de-dupe of all of the analysis events by organization ID.
3. I applied filters to this query to get rid of the noise. For example, I’m excluding analysis calls done on the the default Sample Project we generate for each account, as well as activity coming from our own internal Keen projects.
This is much easier to do since we released a new query builder. It dynamically builds the URL for me as I add more filters, and also gives a live update of the count as I apply filters.
What’s left after the filtering are organizations who have created their own custom projects and run analysis calls on them.
Now we have a metric that correlates directly with our goal for the next few months. We cheer every time the number goes up. I think this is a good example of how you can use analytics to focus your business and align your team.
Saved Queries
Here’s what that raw HTTP query looks like. It’s really long because it has 9 filters and they are JSON-encoded.
It works great, but it’s kind of annoying if I want to add another filter later. Lucky for me, we have a feature called saved queries. Now I can save this query with a short name. I called it “engaged_devs”.
Here’s what the saved query URL looks like.
https://api.keen.io/3.0/projects/<projID>/saved_queries/engaged_devs/result?api_key=<key>
The short URL is much easier to work with. If I want to add additional filters later (for example, exclude Kirk’s activity on his re-route project), I can simply login to Keen.io and add a filter to that saved query. No need to update the reports & dashboards where I’ve embedded this query, since the URL doesn’t change.
===
This post is Part 2 in Michelle’s Analytics Showcase. Here are some links to other posts in the series:
====
Michelle’s Analytics Showcase: