Move the analyitcs code to the head