Hi Jasper,
just in case you or anyone else on the list is on a fruitless search to also implement event tracking as part of your work with ga.js, it would *appear* that this is still in beta. The event stuff is well documented, but I had to dig around to find out why I wasn't seeing anything appearing in the GA reports. You need to apply to get on the Trusted Tester program to get this switched on for your account
http://code.google.com/apis/analytics/docs/trustedTester.html

Event docs are here (basically same as pages but with additional parameters, which you might find useful)
http://code.google.com/apis/analytics/docs/eventTrackerGuide.html

regards

Ben

Adam van den Hoven wrote:
Jasper,

I believe that Marcus' point was that instead of hard coding it into the HTML, that you write some JavaScript code to do it for you. Something like this should be more than fast enough for your needs:

(function (){
  //Always isolate your JavaScript from the global scope
  var links = document.getElementsByTagName("a"),
      this_host = window.location.host;
  for (var i = links.length - 1, lnk; i >= 0; i--){
     lnk = links[i];
     if (lnk.host !== this_host) {
lnk.onClick = "pageTracker._trackPageview('outbound/" + lnk.href + "');"
    };
  };
})();

I haven't tested it but it should work, more or less correctly. You could use a library to set the event, if you like, but looping through the anchors this way is the fastest possible way to do it.

Adam

On 30-Sep-08, at 9:59 PM, Jasper Kooij wrote:

Hi Marcus,

How is the above ga tracking different from the new ga.js? That's the
one I'm using on my wordpress where I can specify by means of a pluging
van joost de valk.

Here is the screenshot of the settings in wordpress for example using
the ga.js to tag:

http://screencast.com/t/l3orhxHo3wq

I'm not trying to reinvent the wheel, just measuring on a website what's
working and what's not.

the outbound tag in
pageTracker._trackPageview('outbound/http://davidseah.com/blog/the-printable-ceo-series/')
and simply be replaced by a preset or specified one. I've checked the
analytics and the tagging works well that way.

The only thing is that the JS code needs to be loaded before the
pageTracker is being called.

So I'm going through the tutorial in creating an extension at the summer
reboot http://wiki.radiantcms.org/Creating_an_extension_I


Jasper
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


--



Ben Still | Red Ant | office +612 9267 8300 ext 208 | mobile 0425 294 271
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to