Friday, 13 April 2012

Gaug.es is Amazing - Just added RealTime website tracking to TeamMentor

If you haven't tried Gaug.es you are missing on a great service. They are now owned by GitHub and it is easy to see why they were bought. Not only you get real-time data, their AirTraffic Live view is just amazing (it's basically world map with a little dot showing a request)

I just added gaug.es support to TeamMentor and I'm really happy with the results. All of TeamMentor's content is dynamic, so it actually making it work required some customizations.

You can see it in action in the TM Documentation site (build using TeamMentor):

As you can see in all cases, I needed to be able to feed gaug.es normalized traffic so that the data collected is a good reflection of what actually happened (what pages where opened, etc...).

To do this, I modified the default https://secure.gaug.es/track.js they provide and  added a couple extra features ( I also host this file from the TM server which is a good security practice)

You can see the final version in this GitHub file Gauges_Tracking_Code.js with the key changes shown  in the source code snippet included below. Once this is set, I can feed data to gaug.es by just calling my_Gauge.track("Action", "Page"):