Drupal uses themes to change the look and feel of your web application. Microsoft Azure offers Visual Studio Application Insights service which allows you to get key application telemetry data out of the box, including usage and requests for PHP applications. In this blog post you will learn how to enable Application insights service in your Drupal web application.
Step 2 : Find html.tpl.php file in your themes folder. For example, if you are using bootstrap theme, you can find the html.tpl.php file in your theme directory sites/all/themes/bootstrap/theme/system/html.tpl.php.
Step 3: Add the JS code inside this file within the <head> section
Application insights give you telemetry on how people use your application lets you focus on the scenarios that are most important to your target audience. You can gain insights into the goals that they find easier or more difficult to achieve. Application Insights provides two levels of usage tracking:
- User, session and page view data – provided out of the box.
- Custom telemetry – You write code to trace your users through your app’s user experience. You can use the PHP SDK for Application insights to build custom telemetry to track specific evnets for an given customer/user scenario
To learn , more about how to view and track usage telemetry click here .
- PHP SDK for Application insights will allow you to send telemetry of various kinds (event, trace, exception, etc.) to the Application Insights service where they can be visualized in the Azure Portal. The SDK gives you the flexibility to customize how and what you track for you web application.
- Web App Availability Testing similar to URL ping test is also supported with Application Insights service. Application Insights will send web requests at regular intervals from points around the world, and can alert you if your application responds slowly or not at all.