I am upgrading the tracking of our company click monitoring tool.  Currently it uses a <img/> tag to call a page and pass the required information to our system.  We need to upgrade this to use <script/> tags and call a JavaScript file hosted on our server, Like Google Analytics Urchin Module
Is there a JavaScript framework / best practice written for this kind of tracking? If not I can write my own but wanted to check that there is not some tried and tested code / practice for doing this kind of tracking.
Thanks in advance.