Is there a Google Analytics-like solution to track REST calls to a web service?

JohnIdol picture JohnIdol · Dec 11, 2011 · Viewed 22.3k times · Source

Just wondering if there's any out of the box solution for this, I am not too familiar with the analytics api maybe I can write some simple js that updates analytics before going to my service etc. -- otherwise I am going to have to stick to the good old 'store records in the database'.

Any help appreciated!

Answer

Kyle Wild picture Kyle Wild · Jul 11, 2013

I think Keen IO would be a great fit here. It's an API-only analytics platform (meaning that you both send data and consume analysis via a REST API).

Full disclosure: I'm the CEO. I'm not writing this answer to self-promote, but because honestly, our product was purpose-built for use cases like yours.

Several Keen IO users are API companies who use it to do analytics on how their users are using their APIs.

At the risk of being a bit too meta: We use the Keen IO API internally to collect events and perform analysis of how our customers use the Keen IO API externally, and by way of example, our two-event data model looks something like this:*

  • analysis_call
    • request (object)
      • client_library_version (string)
      • API_version (number)
      • query_parameters (key-value object)
      • post_parameters (key-value object)
      • origin_ip (ip address)
      • URI (string)
    • num_events (integer)
    • includes_geolocation (boolean)
    • user_agent (string)
    • response (object)
      • HTTP_code (number)
      • latency (number)
      • headers (object)
      • body (object: the actual full JSON response object, if under 1K)
  • events_added_call
    • client_library_version (string)
    • API_version (number)
    • origin_ip (ip address)
    • request (object)
    • response (object: the actual full JSON response object)

*We actually use a lot more properties than this, I've stripped them out to make this more clear