I would like to track file downloads using the method described here:

http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=27242

This requires that the script calling urchin.js appear before the links to the downloads. Is there a way to use something besides hook_footer to get the script to be inserted just after the tag?

Comments

budda’s picture

Have you tried this with the current way urchin.js is loaded?
What errors do you get?

onClick="javascript:urchinTracker ('/downloads/map');" is only going to call the urchinTracker() function when a link is clicked on, which is after the page & jscript has loaded, so i see no problem with the existing implementation...?

I think there is also a better patch to achieve this using unobtrusive JScript and Jquery to add the onclick attributes to Anchors upon page load.

budda’s picture

Status: Active » Closed (duplicate)