_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
But where do you use this? You could add it to the click event (either in your JavaScript, or in the markup, using the onClick attribute). But if you want a global solution, you need to fire it for all hashchanges. This can be done using the jQuery hashchange plugin:
$(window).hashchange(function() { // put any other hashchange magic you might want to do here _gaq.push(['_trackPageview', location.pathname + location.search + location.hash]); });
REFERENCES
http://www.searchenginepeople.com/blog/how-to-track-clicks-on-anchors-in-google-analytics.html