Add ApplicationInsights to your O365 SharePoint sites

If you use ApplicationInsights in your SharePoint Apps you might also want to include it in all sites of the hosting web. You can do this by injecting the corresponding JavaScript using the client side object model (CSOM) and UserCustomActions. Go to https://portal.azure.com/ and open your ApplicationInsights-Application or create a new one. Go to “Quick start” – “Get code to monitor my web pages” and copy the code insight the script tags. Save the script to a JavaScript file and upload it to your O365 site (i.e. to /Style%20Library). Use the following PowerShell script to inject the JavaScript file without … Continue reading Add ApplicationInsights to your O365 SharePoint sites