updated tracking code and moved to head