Put google analytics in <head>. It's asynchronous anyway.
minor refactoring