One of our services wanted to use Google Analytics for their SharePoint (MOSS 2007) intranet.
There’s some good information out there about how to set this up, but I wanted to clarify a few points in the hope of saving others some time.
The basic steps are:
Obtain the Fully Qualified Domain Name (FQDN) for your MOSS site.
Create your Google Analytics account (see detail below). FYI, You don’t need to pass any authentication in order to track hits to your site.
Add the GA tracking code to your site’s master page within the HTML tags, which will allow you to analyze all the sub-pages, not just the home page.
With regard to step 2, when you set up your new account, you need to enter your FQDN in the URL field, and you need to enter it the way they specify:
However, to work with MOSS, what really needs to be entered for the Website URL is the full URL with the /pages/default.aspx ending. Thanks to this post for this information! So you need to go back into the settings once you’ve created the account, and change it. Finding your way into the settings to change the URL is not the most intuitive thing in the world, so I’ve shown it below:
From the home page of your Google Analytics account, click Edit:
Then, in the Profile Settings window, click Edit at the upper right:
At this point you can change your website URL. For the example I’m using, you would enter:
After 24 hours, you should be able to review results on your GA account page.