On header.
I tried to paste in footer, when i went to verify my site in webmaster tools, it said there is no google analytics code.
When i pasted it in header, my site successfully verified using webmaster tools owner. Well, there are many alternatives in verifying ownership in webmaster tools, but the failure to read analytic codes seemed that it is better to put in header.