(processing from previous answer ...)
In general, your code might look like this:
_gaq.push(['_trackPageview',location.pathname + location.search + location.hash]);
You can associate this code with every hash change in your application or use the common hashchange plugin , which uses HTML5 onhashchange and some backward compatible hacks for older browsers and binds this code to this event, so it fires every time the hash changes.
Using this plugin, your code might look like this:
$(window).hashchange( function(){ _gaq.push(['_trackPageview',location.pathname + location.search + location.hash]); })
Yahel source share