Walkthrough: Enabling Telemetry for Microsoft Dynamics CRM Online using Application Insights
This article shows you how to get telemetry data from Microsoft Dynamics CRM Online using Azure Application Insights. We’ll walk through the complete process of adding Application Insights script to your application, capturing data, and data visualization.
Add Application Insights to new or existing CRM Online instance
To monitor your application, you add an Application Insights SDK to your application. The SDK sends telemetry to the Application Insights portal, where you can use our powerful analysis and diagnostic tools, or export the data to storage.
Create an Application Insights resource in Azure
- Get an account in Microsoft Azure.
Sign into the Azure portal and add a new Application Insights resource. This is where your data will be processed and displayed.
Choose ASP.NET as the application type.
Open the Getting Started page and open "Monitor and diagnose client side".
Keep the code page open while you do the next step in another browser window. You'll need the code soon.
- Open your CRM Online instance and login with administrator privileges.
Open Microsoft Dynamics CRM Settings, Customizations, Customize the System
Give it a name, select Script (JScript) and open the text editor.
Copy the code from Application Insights. While copying, make sure to ignore script tags. Refer below screenshot:
The code includes the instrumentation key that identifies your Application insights resource.
Save and publish.
In Microsoft CRM Online, open the Account form
Open the form Properties
Save and publish your form customizations.
You have now set up telemetry capture for the form. Whenever it is used, data will be sent to your Application Insights resource.
Here are samples of the data that you'll see.
Click the chart to get more detail:
Inside page view request
You can do even deeper analysis if you export the data to Microsoft Power BI.