How to apply Google Analytics on Sharepoint-Addin Webpart. I have implemented Google Analytics in regular aspx pages of dotnet application but dont know how to do the same in Sharepoint-Addin.


Assuming its just a MVC app, you would just need to add your snippet into the _Layout.cshtml

The following link will give you an idea of how it works.


  • 1
    i did mate. add the snippet to layout.cshtml. please re read, or suggest how i can improve – James Randal Sep 19 '18 at 5:49
  • James it is an AddIn webpart of sharepoint online – Rajeev Kumar Sep 19 '18 at 6:01
  • yes i read that. and there are a number of ways creating them. MVC is one them (and very common). share code to clarify. – James Randal Sep 19 '18 at 6:04
  • it is sharepoint hosted javascript based Addin – Rajeev Kumar Sep 19 '18 at 6:22
  • ah ok fair enough. cant you simply add the javascript inside yours? – James Randal Sep 19 '18 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.