Filter script action

You can filter (exclude) certain objects such as domains, scripts, and third-party resources from your script results because they do not reflect what you want to measure. By using filters, you can prevent requests being made for any objects that match the filter criteria that you define.

You can use Filter actions to both turn on and turn off filtering. Insert a Filter action at the point in the timeline where you want to start filtering, and another Filter action at the point where you want to stop.

Filter objects

  1. Add a Filter action in the timeline.

  2. Define the filter criteria.

  3. Filtering continues through the script until you turn it off. Add another Filter action to turn the filter off, if necessary.

Add a Filter action

  1. In the timeline, click the action separator timeline action separator where you want to insert the Filter action.
    Add an action

  2. Select the plus icon to display the list of actions.

  3. Select Filter.
    Select Filter action

Define a filter

  1. Enter a name for the filter in the Filter Name field.

  2. Select Turn Filter on.
    The Criteria box appears. It is only displayed when Turn Filter on is selected.
    Turn filter on

  3. Click next to the Criteria box.
    A row is added with fields to specify a string for the criterion. Select whether an object to be filtered Contains, Ends with, or Starts with the string.
    Define filter criterion
    Repeat as needed to define all the criteria.
    Any item matching any of the criteria will be excluded (Boolean OR). The entire requested URL is matched against the filter criteria including the protocol, domain, port (if specified), path, and query string (if specified).

  4. By default, the Filter action excludes any object that matches the criteria. However, you can use the filter to include only the objects that match the critieria. To limit data collection to these objects and filter out all other objects, select Exclude all URLs not matching the above filters.

Turn off a filter

If you want to stop filtering before the end of the script, insert another Filter action to cancel the previous Filter action.

  1. As described above, add a Filter action in the timeline where you want to stop filtering.

  2. Enter the name of the filter to turn off.

  3. Select Turn Filter off.
    Turn filter off