If you want to add 3rd party scripts such as Google Analytics and others into your template, simply edit the "layout.php" file inside the corresponding folder in the "layouts/" directory of the template directory. Make sure you have a backup done before doing any changes. If for some reason you cannot recover the original file, you can reinstall the core template over the existing one.