moved analytics code into head