Enabling XMLHttpRequest (XHR) Instrumentation

Document created by DPM Admin Employee on Jul 14, 2017Last modified by Nic Jansma on Oct 9, 2017
Version 2Show Document
  • View in full screen mode

By default, mPulse only measures the performance of the navigation, and does not monitor subsequent activity like Ajax (XMLHttpRequest) requests.

 

However, you can easily configure mPulse to measure the performance of your application's XMLHttpRequests (XHRs).  When XHR instrumentation is enabled, any time a XHR is caused by user activity (e.g. a click), or, any time the XHR triggers a change of the view (e.g. images get added to the page after the XHR finishes), the performance of the XHR and subsequent resources are measured and reported to mPulse.

 

Warnings

  • With XHR instrumentation enabled, you will see an increase in beacon usage. It is possible that the increase may exceed your beacon limit, causing data collection to be throttled.
  • Navigations and XHRs both report the total duration via the Page Load Timer, but the two will have different timing characteristics.  For example, XHRs may be faster than Navigations.  You should use the Beacon Type filter to ensure dashboards are not mixing the performance of the two types of beacons.
  • XHRs can affect the Session Length (number of pages visited), which affects Bounce Rate.  If you don't want some or all of the XHRs to affect the Session Length, you can mark those XHRs as a Subresource.

Configuring XHR Instrumentation

The various options for Capture XHRs are located on the URLs tab in mPulse App Configuration screen:

 

 

There are three options for enabling XHR instrumentation:

 

  • None
    • When selected, no XHRs will be instrumented
  • Only Matching
    • This acts as a white-list: when selected, only XHRs matching one of the Page Groups in the URLs tab will be instrumented
    • If a XHR does not match a Page Group, it will not be tracked 
  • All
    • This acts like a black-list: when selected, all XHRs will be instrumented
    • If a XHR does not match a Page Group, it will be tracked and reported in the (No Page Group) bucket
    • You can stop specific XHR URLs from being instrumented by choosing Ignore XHR in the Match On column

 

There is an additional checkbox:

 

  • Mark XHR as background activity unless matched in the list above
    • When selected, XHRs are treated as a Subresource (and won't affect Session Length) by default, unless the Match On column is set to XHR
    • When not selected, XHRs are treated as a full navigation (and will affect Session Length) by default, unless the Match On column is set to XHR Subresource

 

For each URL in the URLs tab, there are five options for the Match On column:

 

  • Navigation
    • The Page Group will only match navigations
  • XHR
    • The Page Group will only match XHRs
  • XHR And Navigation
    • The Page Group will match both navigations and XHRs
  • XHR Subresource
    • The Page Group will only match XHRs, and they will be marked as Subresource (and won't affect Session Length)
  • Ignore XHR
    • Only available when Capture XHRs is set to All
    • Any XHRs matching the specified URL will be ignored and not instrumented

Configuring Timers, Metrics, and Dimensions

For Custom Metrics, Timers and Dimensions, you can control whether they apply to XHRs or not.

 

The Include On dropdown for each Metric, Timer and Dimension has three options:

 

  • All Beacons
    • This is the default option for new timers, metrics, or custom dimensions
    • The timer/metric/dimension will be included on both navigation and XHR beacons
  • All non-XHR beacons
    • The timer/metric/dimension will only be included on navigation beacons
  • Only XHR beacons
    • The timer/metric/dimension will only be included on XHR beacons

Note: The Include On option only appears if you have selected Capture XHRs.

 

To Filter XHR beacons in Dashboards:

  1. Add the Beacon Type filter to your dashboard
  2. Select the types of beacons you want to display

Attachments

    Outcomes