Enable SharePoint Site Owners to read SharePoint site usage data saved in Google Analytics


  • Most analytic tools allow the site administrators/business leads to read how their site is being visited/used.
  • Site owners cannot review specific data themselves and they have to reach out to site administrators/business leads.


  • Build a Custom Web API to interact with Google Analytics and enable users to post queries for analytics data directly from a SharePoint Hosted App.
  • Now site owners don’t have to request information from the site administrators/business leads.
  • Site administrators/business leads don’t have to handle the requests coming from site owners to see their site usage.



  • User navigates to the SharePoint hosted app page.
  • The SharePoint hosted app page will pass the requests based on the metric selected by the user to collect information using the custom Web API
  • The Web API will authenticate using a service account/Client ID & Secret, then interacts with Google Analytics API and receive the response from Google Analytics, returns the data back to the SharePoint hosted app page.
  • SharePoint Hosted app page will process the output received from the custom API and present the data to user in a readable way as shown below:


Disclaimer and confession
This is not a drop in solution and you have to adapt it to suit your needs: your mileage may vary and I actually learned most of what I know on this subject the past few years. I am not following best practices, but this post should get you started.


About Joseph Velliah
As a SharePoint Developer my professional interests tend to be technical and SharePoint focused. I run a blog at "SP RIDER" where you can expect to read HOW TOs and scenarios that I run into during my day to day job. I hope my posts will give back a little to the community that is helped me.

Comments are closed.

%d bloggers like this: