adding google analytics via echo or between tags

As long as you’re quotes are escaped to render the final code correctly, you should be fine either way. That just a matter of preference.

If you go with the first route, you’ll be able to migrate your scripts to an external source with very little extra effort. The second way can get a little annoying if you need to unslash quotes.