Added analytics code, seperated header