Tracking UI Level Links: An Open Source Script
Posted At : April 22, 2008 9:51 PM | Posted By : Andy Edmonds
Related Categories: analytics
One of the challenges with the current complex site designs is that multiple links to the same destination tend to appear on the same page.
This does not allow you to understand how your allocation of real estate is being used without resorting to really fancy analytics packages.
To solve this problem I developed a script that upon every click, walks up the document object model (DOM) looking for a an attribute on an HTML tag of ui.
If it finds one before it hits the BODY tag, then it adds a parameter to the link called ui with the value of that attribute, allowing you to understand which links on a page are being used. Shown below is a report from Google Analytics for this site showing how people arrive at my bio page: