PageView telemetry: Application Insights data model
PageView telemetry (in Application Insights) is logged when an application user opens a new page of a monitored application. The Page
in this context is a logical unit that is defined by the developer to be an application tab or a screen and isn't necessarily correlated to a browser webpage load or refresh action. This distinction can be further understood in the context of single-page applications (SPA) where the switch between pages isn't tied to browser page actions. pageViews.duration
is the time it takes for the application to present the page to the user.
Note
- By default, Application Insights SDKs log single PageView events on each browser webpage load action, with
pageViews.duration
populated by browser timing. Developers can extend additional tracking of PageView events by using the trackPageView API call. - The default logs retention is 30 days and needs to be adjusted if you want to view page view statistics over a longer period of time.
Measuring browserTiming in Application Insights
Modern browsers expose measurements for page load actions with the Performance API. Application Insights simplifies these measurements by consolidating related timings into standard browser metrics as defined by these processing time definitions:
- Client <--> DNS: Client reaches out to DNS to resolve website hostname, DNS responds with IP address.
- Client <--> Web Server: Client creates TCP then TLS handshakes with web server.
- Client <--> Web Server: Client sends request payload, waits for server to execute request, and receives first response packet.
- Client <--Web Server: Client receives the rest of the response payload bytes from the web server.
- Client: Client now has full response payload and has to render contents into browser and load the DOM.
browserTimings/networkDuration
= #1 + #2browserTimings/sendDuration
= #3browserTimings/receiveDuration
= #4browserTimings/processingDuration
= #5browsertimings/totalDuration
= #1 + #2 + #3 + #4 + #5pageViews/duration
- The PageView duration is from the browser’s performance timing interface,
PerformanceNavigationTiming.duration
.- If
PerformanceNavigationTiming
is available that duration is used. - If it’s not, then the deprecated
PerformanceTiming
interface is used and the delta betweenNavigationStart
andLoadEventEnd
is calculated. - The developer specifies a duration value when logging custom PageView events using the trackPageView API call.
- If
- The PageView duration is from the browser’s performance timing interface,
Feedback
Submit and view feedback for