Introduction
This application customizer will track the pageviews using Azure App Insights. The customizer will track the react routing which is used in SPA, in SharePoint Online it tracks the navigation between the news post which is not the actual post back. Also, added some custom properties about the site and the logged-in user details for report usage.
Pre-requisites
Azure Application Insights has to be configured. Please follow the link Create an Application Insights resource to create the Application Insights resource and grab the Instrumentation Key which is required for the extension to pass the tracking data.
Properties
- appInsightsKey – Instrumentation Key to monitor the tracking data to be updated to Azure Application Insights.
Note: Used the React plugin provided by Microsoft. For more information click this link
Preview
Log Details

Page View Analysis

Performance Chart

Retention

User Flows

Users Chart

Source Code
The above extension is shared with the community and is of free to use. Please click the below link to download the code and have fun.
js-application-appinsights-advanced
Happy Coding…