Pages
Page list
Get a list of the pages that have received Field Testing traffic
GET /{website-id}/field-testing/pages
This shows a list of the pages that have received Field Testing traffic:
200 OK
{
"result": {
"count": 17976,
"list": {
"/": {
"count": 11892,
"percent": 66.2
},
"/product": {
"count": 978,
"percent": 5.4
},
"/pricing": {
"count": 731,
"percent": 4.1
},
...
}
}
}
The list has a result
object with a count
value showing the total number of distinct pages (may be rounded if very large), and the list of pages in the list
object described here. Note that it's not an array, but an keyed list:
Property | Description |
---|---|
key | The relative and normalized URL of the page |
count | The number of pageviews of the page |
percent | The percentage of the pageviews compared to the total number of pageviews |
The URLs of the pages are normalized by removing everything but the path itself (no protocol, domain, querystring or hash fragment), lower-casing it, and removing the trailing slash if that exists (unless it's the home page "/")
Page list with metrics
GET /{website-id}/field-testing/pages?timing=lcp+fid+cls
If you add the timing
parameter, you will get the page list including one or more metrics:
200 OK
{
"result": {
"count": 18004,
"list": {
"/": {
"count": 11893,
"percent": 66.1,
"lcp": 2116,
"fid": 0,
"cls": 0
},
"/product": {
"count": 978,
"percent": 5.4,
"lcp": 1026,
"fid": 0,
"cls": 0.037
},
...
}
}
}
The result.count
property shows the total number of pageviews in the report. This number may be an approximation. Each item under result.list
contains a key (the page path), and some properties:
Property | Description |
---|---|
key | The relative and normalized URL of the page |
count | The number of pageviews of the page |
percent | The percentage of the pageviews compared to the total number of pageviews |
...metrics | See below |
You can use the following values for timing
and you can combine them by adding a plus sign between them.
Metric | Description |
---|---|
lcp | Largest Contentful Paint |
fcp | First Contentful Paint |
fp | First Paint |
fid | First Input Delay |
inp | Interaction to Next Paint |
cls | Cumulative Layout Shift |
ttfb | Time To First Byte |
dns_time | DNS lookup time |
connect_time | HTTP connection time |
server_time | Backend waiting time |
transfer_time | Network transfer time |
dom_time | DOM rendering time |
fully_loaded_time | Fully loaded time |
transfer_size | Response size in bytes |
dom_size | Size of the HTML in the rendered page |
dom_elements | Number of DOM element in the rendered page |
You can also use numeric custom variables as a timing metric.