First off, I’d like to wish a happy new year to all of you. I hope that this year is even better than last, and I must admit that last was very good for me!
Alrighty, so one of my clients took my advice and asked me to implement the new ga.js tracking cookie on his site. I didn’t pay much attention to what had changed, and just uploaded the new code without thinking about it. Google offers upgrade, they must insure backwards compatibility right?!?! Naw, that would be way too simple, instead they decide to take Microsoft’s lead and nerf backwards compatibility.
Ok, great, it doesn’t work so how do we fix it? Well, in this case, my client re-directs links to other sites. These redirects are driven via database driven backend and tend to change often enough that they shouldn’t be (and aren’t) hardcoded. To capture these clicks in analytics (which we compare to our own tracking system and notice a less than 5% difference) we used the following in our links:
onClick="javascript:urchinTracker('/outgoing/uniqueID_or_Title');"
and then changed it to
onClick="javascript:pageTracker._trackPageview('/outgoing/uniqueID_or_Title');"
So how will it work out? Hopefully all will be fine and our data will once again be tracked by analytics… if not I’ll let you guys know. BTW: You can find the information on google here: (for both versions of the tracking code)
GA Tracker (new)
Urchin Tracker (old)
Charles
May 29th, 2008 at 10:16 am
thanks! really helpful