In trying to add Mixpanel analytics to a project, I discovered that this is not so straightforward in client side MVC frameworks like EmberJS (we’re using v1.2 as of this writing). There is a nice writeup here but it’s out of date from a Mixpanel perspective, as they discontinued Streams a few months ago. The solution I arrived at involves a global jQuery event handler on hashchange combined with a call inside my Ember application initialization. Gist follows.
Hopefully the Ember team comes up with a better way to do this sort of thing, since the only other examples trigger before the actual document URL is updated. See here for a bit of history.