Move analytics code to head.