Because a WordPress blog is a dynamic, database-driven site, there’s not a simple place to insert the Google Analytics tracking code. Fortunately, however, some clever people have created free plugins that will insert your Google Analytics code everywhere it needs to be without you ever touching the template files. The plugin I use can be found here, but you can also google “wordpress plugin google analytics.”
If you use the one I linked to above, just extract the folder and upload into your “plugins” folder, inside your “wp-content” folder. NOTE: with that particular plugin, you need to use the “legacy” urchin.js tracking code, not the newer fancier one. In your google analytics control panel there will be an option to copy the urchin.js version or the newer one. Make sure you use the urchin.js one for this plugin.
Once you’ve uploaded the plugin, activate it from within your WP Admin area under the “Plugins” tab. Then, under “Settings” (”Options” if you’re on an older version of WordPress) and you should see a “Google Analytics” link in the submenu. Click on it, and past your code into the box and then click save.
Related Posts: Uploading and Installing a Plugin, Adding Statcounter tracking code to your blog