Moved the analytics to head