Google advises putting the google analytics script right before closing the .
However, I would prefer to combine it with the rest my javascript
You're risking nothing really. Putting tags at the end of the
is recommendable because of the blocking nature while executing the Javascript it encloses. Since the Javascript for GA is dynamically inserted and therefore non-blocking, you can put it anywhere.
I guess the only "problem" Google sees is, when putting that code at the bottom of your site, you might not catch visitors / pageloads cancel the request before completed. If someone calls your HTML document and cancels the request, the GA code might not get encountered (and therefore, not executed).