Search code examples
node.jsgoogle-analyticsserver-side

How to track usage on a node.js RESTful service with Google Analytics?


I've written a RESTful node.js service as a backend for http://www.cross-copy.net and would like to not only track usage of the web-client but also other clients (like commandline or Apps) which use the service for inter-device copy/paste. Is it possible to embed the Google Analytics JavaScript API into a node.js application and do server-side tracking?


Solution

  • As Brad rightfully sad, there was nothing for Node... So I wrote a nodejs module tailored for this these last few days and just published it on NPM: node-ga

    The module is still really new (barely trying it in production on a pet project), so don't hesitate to give your input :)