Starting with a simple Asp.net form:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="WebApplication1.WebForm2" %>
http://www.w3.org/1999/xhtml">
1. We would start by adding the JavaScript to start the default instrumentation for usage (in purple below)
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="WebApplication1.WebForm2" %>
http://www.w3.org/1999/xhtml">
_daAnalytics.init("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
_daAnalytics.trackPage();
This JavaScript is created for you, and can be found in the Application Insights by clicking on the Control panel Icon:
2. The next step is to add the custom event to the HTML source. This is done by calling __da.trackEvent() in green below.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="WebApplication1.WebForm2" %>
http://www.w3.org/1999/xhtml">
_daAnalytics.init("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
_daAnalytics.trackPage();
4. Now to find these events in Application Insights: go to the Usage menu select Events Insights and find your custom event…AFTER you select your custom event you will see the number of events that occurred and their distribution…For instance you can see the Happy button was selected 20 times and the Unhappy button selected 15 times.
4. If you wanted to see the values of the custom event you will want to use the “Events” report.
After selecting your custom event choose the details tab and you will see heuristics about your custom event like the min, max and average values
(Much of this information is also available at at: http://msdn.microsoft.com/library/dn481098.aspx)