Per default, Google Analytics tracks the whole URL. As a lot of our URLs contain some parameters or IDs, and we’re not interessted in tracking them, we needed to find a way to truncate them. As Grails unfortunately does not provide methods to access the current view and controller (which is basically what we’d like to track) in GSPs, we used this code:
-
pageTracker._trackPageview(${request.getServletPath() – ‘/grails/’ – ‘.dispatch’});
Not as clean as we’d like to have it, so suggestions are welcome!



