Application Insights provides valuable analytics into the usage and performance of apps. In this post, I’ll walk through how to enable Application Insights for monitoring your Power Apps portals.
Why App Insights for Portals?
Out-of-the-box, Power Apps portals lack detailed usage reporting. By integrating Azure Application Insights, portal owners gain access to:
- Page view, user, and session metrics
- Performance monitoring
- Custom events and segmentation
- Robust alerting capabilities
These capabilities reveal adoption trends, catch performance issues, and inform future portal development.
Prerequisites In order to follow along, you’ll need:
- A Power Apps portal up and running
- Access to the portal management app
- An Azure subscription to create an Application Insights resource
Add a new resource: Application Ingsight in Azure
Add new application insight resource and copy the instrument key, from the overview page.
Azure Application Insights JavaScript code snippet
Copy the script from ApplicationInsightsV2_SnippetAndExample.js , ref article Power Pages – Implementing Application Insights
OR
you can use the official link to locate the script https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-sdk?tabs=javascriptwebsdkloaderscript#snippet-based-setup
Add snippet in portal management app
Copy script here and replace the instrument key, click save, this will create a new content snippet.

Confirm the integration in Azure Application Insights
Locate the logs in the azure application insight, locate the pageViews table, double click it to open it in query editor, run the query and see the results.