Using the measurement protocol with Node.js: The universal-analytics package

1,298 views
Skip to first unread message

jo...@mouse3k.com

unread,
Feb 11, 2013, 3:50:59 PM2/11/13
to google-analytics-m...@googlegroups.com
Hi there,

after getting access to Universal Analytics and the Measurement Protocol last week we began thinking about how to best test it. We are currently developing a web app which on the server side uses Node.js. It is pretty much login-only, so using the protocol and the user tracking ID to track across device boundaries makes perfect sense.

So, as a first step, I created a node module called "universal-analytics" to initiate tracking from within Node.js on the server. 

It is available on NPM and Github if you want to have a look: 


Let me know if you have any feedback and suggestions! I'm looking forward to it.

Obviously, a numer of tracking features (social, exception, custom, etc.) are still missing, so I will be adding to it in the next weeks!

Cheers, Jörg

(I hope this is not the wrong place to tell you guys about this)

Nick Mihailovski

unread,
Feb 11, 2013, 5:58:44 PM2/11/13
to google-analytics-m...@googlegroups.com
Nice Jorg,

Can you share how doing the tracking server side has helped you over doing the measurement client side?

Also I'm curious, did you try the analytics.js JS library?

-Nick

jo...@mouse3k.com

unread,
Feb 12, 2013, 3:25:35 AM2/12/13
to google-analytics-m...@googlegroups.com
Hi Nick,

we are just getting started, so all I can tell you are first experiences. When I say in the intro of the module that no client-side tracking is necessary, I don't mean to say we have entirely shifted to the server side. 

Our current approach is using a mixture of analytics.js for the frontend and the node module for server-side information relating to billing, sent emails, etc. Tracking something as simple as a pageview or a click on a button on the server side is rather difficult, so we plan to keep that in the browser. Server-side tracking helps us with things happening outside of the user's direct control. 

I'll keep you posted on our experiences :)
Reply all
Reply to author
Forward
0 new messages