Informal tip to recommend Yoast's Google Analytics for WordPress plugin.
It allows much more control than if you just plop the analytics code in your header. Give the video a watch - it's very informative!
Google Analytics for WordPress
Adding Google Analytics to WordPress is easy, using it's complete power, custom variables, 404 tracking etc is hard, unless you're using this plugin!