Analytics
3.4K members online now
3.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Using Google Anlaytics to record hits on an API

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

Is it possible to setup events to record how many times our API is hit by another. We currently receive a lot of business through partners integrating with our API, and the number of partners has increased significanlty.

 

I want to be able to track as a goal or event every time a request is sent to our API - is this possible? Is there any easy way to do this in Google Tag Manager?

 

Kind regards,

 

Brendan

1 Expert replyverified_user

Using Google Anlaytics to record hits on an API

Rising Star
# 2
Rising Star

Hi Brendan,

 

I'm not sure if we have enough info to answer.  That said, if you are trying to measure something that does not happen during a normal web or app session, then you can use the measurement protocol (MP) to construct a hit and then send it to a property of your choosing. 

It really doesn't matter what you measure, I'm building out hits for when my doors and windows open at home (for example), you just send them via the MP.

 

More on that here:

 

https://developers.google.com/analytics/devguides/collection/protocol/v1/

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn