Tuesday, December 18, 2012

How to add Google Analytics to SharePoint Online


SharePoint Online provides some basic usage statistics if you browse to the /_layouts/UsageDetails.aspx and the /_layouts/Usage.aspx pages.
This is limited to 30 days, however, and there are only a few basic reports available. And they are not that accurate.
One way to improve this usage reporting is to use an online web analytics solution such as Google Analytics.

This will give you more detailed information about your users and let you view track statistics over any length of time.



SharePoint Online Analytics Features

Once you have set up a Google Analytics account and generated the tracking code you can use the steps below to add this to your Office 365 SharePoint Online environment.

  • Log into your SharePoint Online site such as company.sharepoint.com
  • Select Site Actions > Site Settings
  • Under Galleries select 'Master pages and page layouts' (or Master pages in the P1 plan).
  • Select the v4.master page file check-box and select 'Download a Copy' from the ribbon (Note if you are not using the default master page you should download the custom master page that you are using. To find out the master page you are using go to Site Settings > Look and Feel > 'Master page' ).
  • Open the master page file you downloaded with a text editor such as notepad and enter the Google Analytics tracking code just before the closing </head> tag and save the file
  • From the master page gallery select 'Upload Document' from the ribbon, select the master page file you saved in step 6 and click OK
  • You now need to Publish and Approve the file before it is visible to other users (note this isn't required for the P1 plan or if you have disabled approval). Before you do this I suggest browsing to the homepage in another tab so that you can check the site is not broken (this can happen if you enter the tracking code in the wrong place).

No comments:

Post a Comment