Google Analytics tracking for manialinks

Open source, lightweight PHP framework for Manialink and Web development.

Moderator: NADEO

Post Reply
User avatar
gouxim
Nadeo
Nadeo
Posts: 1154
Joined: 14 Jun 2010, 17:20

Google Analytics tracking for manialinks

Post by gouxim » 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.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)

reaby
Posts: 861
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Google Analytics tracking for manialinks

Post by reaby » 10 Jan 2011, 19:38

NICEEEE one. Good job!

User avatar
Seth-Rah
Posts: 1
Joined: 13 Mar 2013, 16:01
Location: South Africa
Contact:

Re: Google Analytics tracking for manialinks

Post by Seth-Rah » 14 Mar 2013, 22:49

Seeing as this is the correct thread for it [even if old] I was wondering how will I set this up for maniaflash links made through the Maniaplanet launcher?
Example URLs highly appreciated, because I see there is a field for google analytics tracking ID however I am unable to get it to register on my analytics page
"Status: Tracking Not Installed"

I am under experienced when it comes to coding so I took the lazy route to make use of maniaflash innate page creator.
http://i.imgur.com/BRIxKrg.jpg
Also what would the default URL be set to under the Property settings page?
Help highly appreciated :>

Post Reply

Return to “ManiaLib”

Who is online

Users browsing this forum: No registered users and 2 guests