How to Approach User Retention Analysis?

So I've been trying to figure out how to set up charts that show user retention analysis. I already have logs of users logging in with their ID and DateTime.

I'm trying to figure out if there is a way to have Kibana display a bar graph with Y-Axis as Percent Users Returned, and X-Axis as Day 1 to Day 90.

Now, I've managed to solve this by pulling the logs from elastisearch and then processing them in a small console program I wrote in C#. The code just pulls the sign up logs of the user and then uses the user's ID to pull all logs associated with the user from elasticsearch. I then have the code calculate the day the user is active after the signup DateTime. I group it by days and then get the count of unique users. To calculate percent, I divided the number of users by the amount of users in Day 0. After this, I put these as a new log into Elasticsearch containing only the Day and Percent of Users.

It displays the data I need once I pull the logs on Kibana. But I'm trying to see if there's a better way to do this, one that wouldn't require me to run a C# program to do the calculations. If I can keep it all within Kibana, that'd be best.

Hi Anothony,

There's 2 possible solutions I can think of;

  1. you can click the Advanced link at the bottom of an aggregation and enter 'JSON Input'. It's rather difficult and I can't provide much help other than a link I've previously found;
    Display concurrency in data on Kibana

  2. Install the Timelion plugin for Kibana. It's pretty powerful and if you search you can find some videos on it. Depending on the version of Kibana you're running you might install it something like;
    /bin/kibana plugin -i timelion



Thanks Lee.

I looked at the advanced link at the bottom and the JSON input.
I'm not sure if Kibana will take in complex queries where the outcome needs to be calculated from multiple docs though.

Timelion looks interesting, so I'll take a look into that some more and see how that goes.