A very simple analytics platform named after the "Homing Pigeon" (Kabootar in Hindi)
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js
tests
views
.gitignore
README.rst
server.js

README.rst

Kabootar

Kabootar is currently a very simple analytics platform that homes back with interesting data.

It not only reports the page load time but may also be used to send other custom data points ala MixPanel (using the recordData javascript function).

Install

Kabootar uses Node.js for the server and Riak as the NoSQL database for storage and querying.

On the client end, two very simple code snippets needs to be pasted into the HTML pages to start sending the data. The below code snippets are inspired from ChartBeat.

Just at the start of the <head>, paste the below code:

<script type="text/javascript">
  var _page_load_start = (new Date()).getTime();
</script>

And just before the end of the </body> tag, paste the below code:

<script type="text/javascript">
  (function(){
    function sendKabootarBack() {
      window._page_load_end = (new Date()).getTime();
      var elem = document.createElement("script");
      elem.setAttribute("type", "text/javascript");
      elem.setAttribute("src",
       (("https:" == document.location.protocol) ? "https://" : "http://") +
       "localhost:8000" + "/js/kabootar.js");
      document.body.appendChild(elem);
    }
    var originalLoad = window.onload;
    window.onload = (typeof window.onload != "function") ?
      sendKabootarBack : function() { originalLoad(); sendKabootarBack(); };
   })();
</script>

On the server, install riak, node.js and the following node dependencies:

$ npm install express
$ npm install riak-js

Run the server:

$ node server.js

Add underscore.js to the js_source_dir defined in apps.config of riak to all nodes.

Open the HTML page with the code snippets pasted above and check the dashboard accessible under /dashboard/ to verify the data being loaded.

To Do

  • Action Detail Page + Order the top 100 results by time + Add realtime refresh support + Add graph
  • Dashboard Page + Add graph
  • Add ability to separate the data sent from multiple sources.