Google Analytics tracking for manialinks
Posted: 10 Jan 2011, 13:15
Hey everyone,
We recently implemented a feature in ManiaLib to enable Google Analytics tracking in Manialinks.
Google Analytics is a very powerful yet free tool for tracking website statistics: http://www.google.com/analytics/.
Usually, to enable tracking on a website, you have to add a small Javascript snippet in your pages. Since there's no such thing as Javascript in Manialinks, we had to improvise.
The idea is simple: the Google Analytics (GA) JS code just an URL (an blank 1x1 GIF image) ith a bunch of parameters in the URL. We therefore created a class that builds this URL so that we can put an invisble "Quaq" with that image URL in our Manialink pages.
The feature is available from ManiaLib 2.0 (more info here)
Everything you need is in the ManiaLib\Application\Tracking namespace.
Because everything (ManiaLib 2.0 and the tracking package) is still bleeding edge, I won't (yet) provide a hands-on tutorial on how to use it. I am simply highlighting the feature so that experienced developers can look into it if they're interested.
When ManiaLib 2.0 is more mature and ready for everyone to use it, I will provide in-depth info so that everyone can benefit from GA tracking in their manialinks.
We recently implemented a feature in ManiaLib to enable Google Analytics tracking in Manialinks.
Google Analytics is a very powerful yet free tool for tracking website statistics: http://www.google.com/analytics/.
Usually, to enable tracking on a website, you have to add a small Javascript snippet in your pages. Since there's no such thing as Javascript in Manialinks, we had to improvise.
The idea is simple: the Google Analytics (GA) JS code just an URL (an blank 1x1 GIF image) ith a bunch of parameters in the URL. We therefore created a class that builds this URL so that we can put an invisble "Quaq" with that image URL in our Manialink pages.
The feature is available from ManiaLib 2.0 (more info here)
Everything you need is in the ManiaLib\Application\Tracking namespace.
Because everything (ManiaLib 2.0 and the tracking package) is still bleeding edge, I won't (yet) provide a hands-on tutorial on how to use it. I am simply highlighting the feature so that experienced developers can look into it if they're interested.
When ManiaLib 2.0 is more mature and ready for everyone to use it, I will provide in-depth info so that everyone can benefit from GA tracking in their manialinks.