Pixel Tracking in Node.js
github.com
github.com
1) Using Math.random() to generate a UUID, is not a UUID. There are plenty of JS uuid generators out there. Please use one. 2) Why are you returning a header with what is being tracked? 3) Please please please use coffeescript.
Recall the article recently on how a deck of shuffled cards is unique in human history? Apply same logic.
What i'm not clear on (and i'd love to hear your thoughts about) is why you'd want it as a middleware component vs a daemonized external service such as http://documentcloud.github.com/pixel-ping/ (and if you care about such things, check out the annotated source: http://documentcloud.github.com/pixel-ping/docs/pixel-ping.h... )
full disclosure: i joined DocumentCloud a few months ago.
with pixel-tracker there is no aggregated information, but there is a little more detailed information about each request
http://alexkessinger.net/2010/12/17/doing-a-pixel-ping-witho...
Or?