Adding Google Analytics/Piwik/whatever to your front-end application can sometimes be tricky, with Chaplin.js it's a breeze though:
# The application object.
module.exports = class Application extends Chaplin.Application
@subscribeEvent '!router:route', @analyticsHooks
analyticsHooks: (route, params)->
This adds a subscriber on the application level for all route events and passes the route and route params to your Application#analyticsHooks.