Chapter 10 – Website Optimization Metrics
To install Google Analytics, a developer need only include this bit of code on every page in the site by means of a site-wide footer:
<input type="button" onclick="getNextPhoto(); pageTracker._trackPageview('/photogallery/ next/');" value="Next" />
Now when users interact with our photo gallery, even though the page does not fully refresh, we will record a page view. You can find more instructions on this level of tagging at http://www.google.com/support/googleanalytics/bin/answer.py?answer=55597&topic=10981.