After working with SharePoint since WSS 3.0, there is one thing that I’ve always heard management ask: “Can we get better analytics than what SharePoint has? You know, can we get reports on the number of users, what pages they use, how often, who they are, where they are.”
Organizations and users have been asking and begging Microsoft to provide better analytics and they listened. Microsoft in a very smart way, or no way at all, actually made a great business move. Instead of attempting to give users any way that would be remotely awesome for web analytics of this sort, they punted such a chance and left it to the better rival: Google.
I know that seems like a false claim, but we shouldn’t feel cheated. Google has invested billions of dollars in search and web analytics and they are by far two of the best in the business and for free. Who doesn’t like free?
Now, your SharePoint environment can track and report live analytics as it happens and with great details. If you’re on SharePoint 2010, you don’t have to deploy any solutions to pull this off, unless your branding was deployed through a solution. With SharePoint 2013, you can use this technique but your change will have to be done via a design package that is uploaded to the farm. This is due to how Microsoft redid the branding aspects of SharePoint 2013.
Are you ready get some awesome stats from your SharePoint site? Start the clock and let’s go:
First off, unless you know magic, you have to have a Google account to even signup for analytic tracking and you have to at least allow modifications or changes to be made to your master pages. Also your site must be visible to Google’s API and bots, else it won’t report back any data. So I am assuming that you have all of that in place.
1. Sign into your Google Analytics Account and click on Access Google Analytics
2. Create a new Account for your SharePoint site and add the SharePoint URL for your site in the right field. Feel free to modify the account and use the new features if you want even more granular analytics. That is not required but nice to have.
3. You should see a piece of code that looks similar to the below screenshot. Be sure to copy all of it. I usually copy mine to NotePad or some HTML editor while I’m working on this process.
4. Once you have the code, perform the following steps, in the order described, to ensure things work best:
a. Create a copy of your files before modifying them (this is best practice and due diligence).
b. Check out your master page and find the bottom “</head>” tag. I say bottom, because it’s often easier to find the bottom tag than search for the top tag.
c. Add the code that you copied above into your master page and then save the file.
d. Check the file in and test it to ensure nothing broke. If things are good, then you can delete your copies.
5. After your code has been added to your pages, open up your home page (or any page for that matter) in a browser and leave it open.
6. Head back over to Google Analytics and click on Reporting > Real Time > Overview.
7. If you’ve done everything correctly, you should at least see 1 person, which would be you hitting that page from your browser.
That’s it. We can stop the clock now and see what we have. While that’s not all you can do, this is a simple example to get your SharePoint site tracking. From there, you can start tracking more pages, user interactions, specific campaigns and a host of other things. Note that this was not tested on Office 365 for the sake of this blog, but it is possible to use Google Analytics for that as well.
Don’t forget to share your comments and thoughts as well.
Happy reporting – Eric