New Relic Browser's
PageViewTiming event sends each data point as a separate event as soon as it is available. Because we do not restrict the timing, you can receive first paint or first interaction data regardless of when it fires. This document describes why and how to use
PageViewTiming and its attributes to query data about your site, component loading, and user performance metrics, both from visual and responsiveness standpoints.
Why use PageViewTiming?
If your application uses asynchronous or dynamic pages, you may need additional details about site or component loading. But pages can load content in many different ways, and users control when they interact with that content. This is why some user-centric performance metrics happen outside the standard window onload (page load time) in the Browser agent.
For example, users may become impatient and begin clicking as soon as content is on the webpage. Or, they may wait to use the page until long after content is loaded.
PageViewTiming event provides a more real-time delivery mechanism that does not have a dependency on any other event. The additional metrics can help you understand how users experience your site, both from visual and responsiveness standpoints.
Detailed interactivity metrics
PageView events end their reporting when they receive the page window load (or window load and AJAX) timing. However, paint and interactivity metrics can happen at any time.
PageViewTiming delivers these metrics as a separate event to:
- Account for the variability in this timing.
- Avoid setting an arbitrary timeout.
- Prevent holding
With the addition of
You can review different types of activities with the
Compatibility and requirements
The interactivity metrics are supported by the following browser versions. For unsupported browsers, no
PageViewTiming events will be recorded.
|Metrics||Supported browser versions|
These metrics require the
Query your event data
Here are some sample queries for the event data to help you get started.
- Percentile over timeseries
Show the 95th percentile of first paint and first contentful paint over a time series:
SELECT FILTER(percentile(firstPaint, 95), where(timingName = 'firstPaint')) as 'fp', FILTER(percentile(firstContentfulPaint, 95), where(timingName = 'firstContentfulPaint')) as 'fcp' FROM PageViewTiming TIMESERIES 1 minute SINCE 1 hour ago
- Percentile by transaction and interaction
Show the 95th percentile of first input delay over a time series, faceted by transaction name and interaction type:
SELECT percentile(firstInputDelay, 95) as 'fid' FROM PageViewTiming WHERE timingName = 'firstInteraction' TIMESERIES 1 minute FACET browserTransactionName, interactionType SINCE 3 hours ago
- Histogram of delay timings
Show a histogram of first input delay timings faceted by first interaction time ranges:
FROM PageViewTiming SELECT histogram(firstInputDelay, 1000, 10) SINCE 3 hours ago WHERE timingName = 'firstInteraction' FACET CASES (WHERE firstInteraction < 1, WHERE firstInteraction >= 1 AND firstInteraction < 5, WHERE firstInteraction >= 5)