Adding Google Tracking Code aka Google Analytics
When adding tracking code such as Google Analytics, it's best not to edit the theme files directly. The best practice is to use a plugin because that way you maintain your ability to update your theme, and there are other benefits such as setting it to ignore admin users so you get more accurate data.
We recommend using either of these two plugins:
Having said that, if you want to edit the files directly, the template you'll want to edit is under:
(assuming that you want to place it in the head tag of your site)