Do you include Application Insights for Visual Studio Online in your website?

Last updated by WilliamYin over 8 years ago.See history

This rule has been archived
Archived Reason: The rule is either out of date or needs to be updated.

Application Insights for Visual Studio Online gives you a great insight into how, when and where your website is used.

If you're not using an analytics package in your website, you're flying blind when it comes to understanding how, when and where your webiste is used.

To add Application Insights to your website, follow these steps.

apin1 compressor Figure: In Visual Studio, go to Tools | Extensions and Updates... and download Application Insights Tools for Visual Studio

** **

apin5 compressor Figure: Once Visual Studio has been restarted, open your solution. Right-click on your web project and select Add Application Insights Telemetry to Project...

(Add Application Insights Telemetry to Project... not displaying? See instructions at the end of this rule)

apin6 compressor Figure: Sign in with your VSO account if required. Then click Add Application Insights To Project

apin7 compressor Figure: This will update your project with the NuGet package and settings to include Application Insights in your project. Check this in and deploy your website.

apin9 compressor Figure: Now when you right-click on your web project there is a new option Open Application Insights Portal...

** **

apin10 compressor Figure: Dashboard showing summary and application metrics

Once deployed, Application Insights will start tracking metrics and interacting with your Visual Studio Online dashboards.

Application Insights tracks a lot of metrics in your website but one of the most useful is the breakdown of visits by each browser (IE, Chrome etc).

apin4 compressor Figure: Breakdown of which browsers are used to access your website

Note: Make sure Server Performance Monitoring is set up (currently not available for Azure Websites)

AnyConnect 1
1.png

Figure: Ensure you complete this process to add Server Monitoring

Sometimes you will be trying to add Application Insights to an existing project and the context menu item will not be there. There is a manual way to add Application Insights if this is the case.

2014 09 05 14 49 56 compressor Figure: Sign into Visual Studio Online, and navigate to Application Insights | Add Application

2014 09 05 14 59 06 compressor Figure: Use these settings to generate the manual instructions

2014 09 05 15 26 32 compressor Figure: Follow these steps to add the Application Insights JavaScript code to your website

We open source. Powered by GitHub