Add a HEAD HTML webpart to your master page and place your tracking code inside of it.
Please, sign in to be able to submit a new answer.