moved tracking code to head