2008-11-19

Click Log - Part 1

Background

My Web site uses urchin.js to track PVs, UUs, etc.
Google provides an account code in the form of "UA-xxxxxx-x".
Presumably, all data should be collected and processed based on this code.

I want to find out which links/forms users are actually clicking.

Problem

I created a new account code and started using _trackPageview provided by ga.js. But, this caused major problems! My site's UUs more than doubled--yet, PVs stayed consistent--for the urchin account! We can't have that, now, can we? There was obviously something wrong...

Upon talking with Google, it seems that the system is not meant to have more than one account on one page at the same time.

So, I decided to get my hands dirty and find out how ga.js works. Basically, it looks like both urchin.js and ga.js use the same cookie values, and that is probably what was messing things up...

Conclusion

According to the documentation, ga.js has some ways of setting cookie names and the URI of a local GIF file. I'll have to look into that to see if I can't get two accounts working on the same page.

At any rate, I think that I'm going to have to start writing my own click log. It might prove to be rather educational!