QUEST
To gather unobtrusively click-through data.
STRATEGY: Client-Side
Use javascript to attach handlers for onclick and onsubmit events to all links and forms on a page.
When a link is clicked or a form submitted, an HTTP request of some kind will be initiated. The request just needs to be sent; we won't care about the response, too much...
The HTTP request destination could be on a different domain; so, it is not practical to use "AJAX". There following are possible ways of sending extra HTTP requests from within a page:
- <style> tags
- <script> tags
- <img> tags
- <iframe> tags
- <object> tags
- <embed> tags
- change a CSS background-image
Maybe there are some other ways...
STRATEGY: Server-Side
Create a "page" (probaly a script in perl or PHP) that will return appropriate content based on the way in which the request was created--e.g., a <style> would return CSS, an <img> a 1x1 transparent GIF, etc.
Showing posts with label Analytics. Show all posts
Showing posts with label Analytics. Show all posts
2008-11-24
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!
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!