If you use the HTML5 History API on your site, good news! Clicky now automatically supports it.

This type of navigation typically only reloads a small portion of your page to inject new content, which means our tracking code (previously) would not be executed again since that part of the page would be static — unless you manually added calls to clicky.log or clicky.pageview when you executed history.pushState or history.replaceState.

Clicky will now automatically track calls to both pushState and replaceState, as well as listen for the window.onpopstate event that occurs when a visitor clicks back or forward in their browser.

If for some reason you need to disable this new functionality, for example you were already logging calls manually, you can do so with the new clicky_custom.history_disable option.

Long term, we want to replace our own custom hashbang-ish navigation that we use on clicky.com with the History API. This automatic support of logging these methods will be a good motivator.

Update, May 7: We’ve removed replaceState()from being auto-tracked, as its purpose is quite a bit different from pushState() and was causing some excess data to be tracked that shouldn’t have been.