There are various packages for sending analytics to GA using the measurement protocol, e.g. https://github.com/irazasyed/laravel-gamp - a wrapper for https://github.com/theiconic/php-ga-measurement-protocol
Check out the async option too, on this one. You don't want your API users waiting for Google! If you use GA on your web views, it is all done async in JavaScript. Once you start doing this in your API backend, you need to consider the performance hit.
Another alternative might be too look at https://piwik.org/
But sounds like you want to build some kind of front end for the analytics too. For one of my projects I just created a table and middleware to log client_id, end point, ip address etc for each call on api. This allows for some basic analytics and management of api.