Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 609
Rodja Avatar asked May 08 '12 08:05

Rodja


People also ask

Can Google Analytics track traffic?

In addition to tracking the number of visitors, Google Analytics provides key insights into how your website is performing and what you can do to meet your goals. You can track everything from how much traffic your website is getting to where that traffic is coming from and how visitors are behaving.


1 Answers

Since all of the answers are really old, I will mention a new npm package: https://www.npmjs.com/package/universal-analytics

It's really great and incredible easy to use.

like image 77
Luca Steeb Avatar answered Sep 18 '22 05:09

Luca Steeb