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!
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.
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.
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.
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.
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:*
*We actually use a lot more properties than this, I've stripped them out to make this more clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With