Moved tracking code to head