Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 516
JohnIdol Avatar asked Dec 11 '11 14:12

JohnIdol


People also ask

Does Google Analytics have a REST API?

Google has started developing a new REST API known as the Measurement Protocol, but this is only in developer preview. There are a few issues to work through when trying to send server-side data to GA.

What Cannot be tracked in Google Analytics?

You can't track Individual users Unfortunately, Google Analytics only allows to use a unique user ID and prohibits sending personal information, username or an IP address. So you can't really see and understand how specific users behave on your site and get valuable data.

Is Google Analytics being discontinued?

Google announced that Universal Analytics will officially retire and stop processing new hits on July 1, 2023. Marketing teams have until that point to find analytics alternatives for website analytics. Google analytics alternatives exist, but Google is making things simple for you to stay.

What does Google Analytics track on a website?

Google Analytics is used to track website activity such as session duration, pages per session and the bounce rate of individuals using the site, along with the information on the source of the traffic.


1 Answers

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

like image 164
Kyle Wild Avatar answered Sep 20 '22 11:09

Kyle Wild