Configuring mPulse to use Page Groups

Document created by DPM Admin Employee on Jul 14, 2017
Version 1Show Document
  • View in full screen mode

Complex web sites are often built with a few templates, each of which have their own performance characteristics. Each template may be rendered with different content, and accessed using different URLs, but from a performance point of view, they look the same.

mPulse Page Groups help you capture and summarize the performance characteristics of groups of pages that belong together. Your home page may make up one group, while your login page may make up a second, and product pages a third such group. Your search results and checkout pages may also have their own groups.

IMPORTANT: SOASTA recommends that new page groups be submitted to SOASTA Support for review. Page group definitions that use variables or expressions have the potential to create large numbers of resulting groups, and a large number of page groups reduces the utility of the function and can delay the loading of dashboards. Additionally, correcting an improper page group definition once it has been applied to incoming data may be impossible.


The Configure Domains, Page Group tab presents settings to define and execute page groups using any of five methods (shown below): JavaScript Variable, Query String Parameter, URL Substring - End of Text, URL Substring - Trailing Text, and URL Regular Expression.

To use the JavaScript Variable definition method, simply define a variable on your page.  To use, Query String Parameter or other definition methods, simply follow the instructions for the selected method. The XPath and URL evaluations are all done client side, and users do not have to write their own plugins to use any of the non-variable match techniques.

 

Page Groups are used in the Page Groups widget (shown below)

 

In all cases when using Query String Parameter matching (whether for Page Groups, Timers & Metrics), a final filter is run on the result that will strip out any invalid characters for that type. So for Page Groups, mPulse strips out any characters that are non-alphabetic, underscore, dash or space. While for Custom Timers & Metrics, mPulse strips out anything that is not a number, a decimal point or a negative sign.

Page Groups using Query String Parameter utilize a priority system, in which first page group that gets a match is the page group that gets used for a given page or view. You specify a Query String Parameter using * as a wildcard anywhere in the pattern.  You can also specify a query string parameter.  We will use the value of this query string parameter as the page group.

All of the steps below are performed by the mPulse user with Domain Administration rights.

Using Page Groups with Variable

Use the following steps to utilize a Variable that is used in your page(s). The Variable can be defined anywhere on the page and at any time before the page finishes loading (e.g., before the beacon is sent).  A page group specific JavaScript snippet can be insertedinto your pages using any namespace that you choose.

  1. Define a Page Group variable and then deploy it onto each of the necessary pages. This JavaScript variable name may be namespaced. For example, use SOASTA.pgor page_group. This variable must be globally readable. For example,

SOASTA = {};
SOASTA.pg = "Your Page Group";

    1. Create a new domain or revise an existing domain and then navigate to the Page Groups tab, Variable name field). Add a row, if necessary.
    2. Add the page group variable name to the mPulse Domain's Page group variable name field .
    3. Click OK after making any change.

 

  1. Click OK to complete adding the page group to the domain.

Page Group Variable Restrictions

There are two restrictions on the page group name:

  • Page Group names may only contain alphanumeric characters, dashes, underscores and spaces
  • Page Group names can be up to 100 characters long—if the length is greater than (>) 100, it will be truncated to 100 instead of being rejected

mPulse uses regular expression (below) to validate a page group, and you may use the same to verify your own code:

/^[a-zA-Z0-9_ -]$/

Defining a Page Group using Query String Parameter

With the query string type Query String Parameter definition method, mPulse looks for the first matching query string parameter from the page that has an URL Pattern match.

The URL used here must have a query string (e.g., a "?" that precedes the non-hierarchical data that follows).

The query string parameter name used (under Parameter 2) must actually be part of the test URL.  

  1. To use this method, create a row in the tab using the Query String Parameter definition method.
  2. Enter the Parameter 1, URL Pattern, from which to extract.
  3. Enter the Parameter 2, Name, which is the portion of the string to omit from matching (this value is also used as the mPulse repository name of the Page Group).

 

 

For example, if Parameter 1 is:

http://www.google.com/*

And Parameter 2 is:

q

Entering the test URL :

http://www.google.com?q=test

Will result in a match of test:

http://www.google.com?q=test

  1. Optionally, enter a Test URL and then click the Test button. If the match is successful, theQuery String Parameter row will turn green (red for no match) and the result is populated in the Result field.

 

 

If the match is successful, the Result field is populated with the resulting match.

 

Defining a Page Group using URL Substring - End of Text

This definition method strips out the specified substring from the start of the text and then uses whatever is left.

  1. First, create a row using the URL Substring - End of Text method.
  2. Enter the URL Start from which to begin to extract.

For example, if *.google.com* is used, then the page group definition will consist of any text that comes after the *.

 

 

 

Defining a Page Group using URL Substring – Trailing Text

This definition method strips out the leading and trailing parts of the URL and uses the remainder.

  1. First, create a row using the URL Substring - Trailing Text method.
  2. Enter the URL Start from which to begin to extract.
  3. Enter the Trailing Text.

Within the substring pattern, mPulse looks for any URL that matches the leading pattern + something + the trailing pattern, and then uses that "something". The Query String Parameter with no trailing part is identical to this except trailing is an empty string.

 

 

For example, if URL Start is *.google.com/=search?vinyl* and Trailing Text continues with "&oq..." , then for the test URL the portion between is parsed as vinyl.

 

 

Defining a Page Group using URL Regular Expression

This definition method matches the URL to a regular expression and then uses the value of the replaced field.

  1. First, create a row using the URL Regular Expression method.
  2. Enter the pattern in Parameter1. 
  3. Enter the page group in the Parameter2.

 

 

 

  1. Optionally, enter a Test URL and then click the Test button. If the match is successful, the row will turn green (red for no match). Additionally, if the match is successful, the Result field will be populated with the given match.

Attachments

    Outcomes