It’s possible to use Google Analytics on a SharePoint intranet site, but there are two items to be aware of.
Firstly, when setting up the profile for the domain don’t worry if you need to add “.com” to the end of the URL, e.g. if your intranet URL is http://intranet you’ll need to enter it as http://intranet.com. If you don’t do this Google Analytics will complain that the URL ends with an invalid top-level domain name.
Secondly, you’ll need to choose the option of “Multiple top-level domain” at step 1 “What are you tracking”. Without this you’re site won’t be tracked.
Finally, take your code and paste it into your master pages using something like SharePoint Designer. I add the script just before the closing </head> tag.