Optaplanner uses a version of pressgang that allows to add the google analytics snippet in the HTML generated. That would be super handy, let's just look at Optaplanner's trick.
Geoffrey De Smet if you have some quick pointers for us, ship them in