Filters
All /{website-id}/field-testing
endpoints accept a large number of filters that can be used to drill down to highly specialized reports. This page describes each filter.
Filter syntax
The filters are added to the REST API call as querystring parameters:
/{website-id}/field-testing/pages?browser=chrome
Multiple values
If a filter has multiple values, simply separate the values with a plus sign:
/{website-id}/field-testing/pages?browser=chrome+edge+safari
Negative values
If you want to add "does not equal" or "has none of the following" filters, simply start the value with a tilde (~) sign. This example means "everything BUT Chrome and Edge browsers":
/{website-id}/field-testing/pages?browser=~chrome+edge
Combining filters
You can add many filters in one report, simply by adding multiple querystring parameters:
/{website-id}/field-testing/pages?browser=~chrome+edge&os=windows®ion=gb
Filter list
The following filters can be used in all Field Testing endpoints:
Filter | Example | Description |
---|---|---|
date | 20230401-20230501 | The date range in yyyyMMdd-yyyyMMdd format. Defaults to last 90 days |
region | europe / us / dk | A two-letter country code or a region name (eu , europe , latam , apac , emea , north_america , americas , oceania , asia , africa ) |
device | desktop | desktop , mobile or tablet (or a combination) |
browser | chrome+edge | Browser type - chrome , edge , firefox , safari , opera , ie , android |
os | mac_os | Operating system - windows , mac_os , linux , ios , android |
page | /products | One or more pages to filter by |
tags | email_campaign | One or more custom tags set via the JS API |
referrer_type | ext | Referrer type - none , self (internal link) or ext (external link) |
navigation_type | normal | Navigation type - normal (follow a link), back_forward , reload (hitting refresh) or soft-navigation (following a link in a single-page application) |
cache | connected | Browser cache state - no_dns (DNS unknown), dns (DNS cached), connected (already connected to server) or fully_cached (page HTML cached) |
memory | 8+4 | Device memory - 8 (Min 8 GB), 4 (4 GB), 2 , 1 , 0.5 (512 MB) or 0.25 (256 MB) |
network_type | 4g | Network type - 4g , 3g , 2g , slow-2g |
Chart and world map settings
Some Field Testing reports support setting the timing metrics, chart intervals and the percentile of the metrics:
Filter | Example | Description |
---|---|---|
p | 90 | The percentile used in the metric values. Can be 50 (median), 75 , 90 , 95 and 99 . Defaults to 75th. |
timing | lcp+fid+cls | A list of the metrics to be used in the Field Testing reports* |
interval | week | The chart interval. Can be day , week or month |
*) Only supported in the Pages and Countries reports. Click on documentation for those reports to see the metric list.
Custom variables
If you have added custom variables to your website, you can also use them as filters. You can add both string variables and numeric variables, as described here.
String variables
A string variable (example: cache_state
) can be used in filters like this:
Operator | Example | Description |
---|---|---|
Equals | cache_state=cold | Matches a single variable value |
One of | cache_state=cold+warm | Matches one of a list of values |
Does not equal | cache_state=~cold | The variable must not equal the value |
None of | cache_state=~cold+warm | The variable must not match any of the values in the list |
Is set | cache_state=* | The variable is set to any value |
Is not set | cache_state=~ | The variable is not set |
Numeric variables
A numeric value (example: react_hydrate_time
) can be used in filters like this:
Operator | Example | Description |
---|---|---|
Equals | react_hydrate_time=100 | Matches an exact number |
Greater than | react_hydrate_time=100.. | The variable value is greater than the given value |
Less than | react_hydrate_time=..100 | The variable value is less than the given value |
Between | react_hydrate_time=100..200 | The variable value is between the two given values |
Is set | react_hydrate_time=* | The variable is set to any value |
Is not set | react_hydrate_time=~ | The variable is not set |