Countries


Country list

GET /{website-id}/field-testing/countries

This gets a list of the countries that your website has received Field Testing traffic from:

200 OK
{
"result": {
"count": 18056,
"list": {
"us": {
"count": 5356,
"percent": 29.7
},
"dk": {
"count": 4851,
"percent": 26.9
},
"gb": {
"count": 957,
"percent": 5.3
},
...
}
}
}

The list has a result object with a count value showing the total number of page views in the report (may be rounded if very large), and the list of countries in the list object described here. Note that it's not an array, but an keyed list:

PropertyDescription
keyThe country code (ISO 3166-1, alpha-2)
countThe number of page views from the country
percentThe percentage of the page views compared to the total number of pageviews

Country list with metrics

GET /{website-id}/field-testing/countries?timing=lcp+fid+cls

If you add the timing parameter, you will get the country list including one or more metrics:

200 OK
{
"result": {
"count": 18066,
"list": {
"us": {
"count": 5356,
"percent": 29.6,
"lcp": 2699,
"fid": 0,
"cls": 0
},
"dk": {
"count": 4861,
"percent": 26.9,
"lcp": 152,
"fid": 1,
"cls": 0
},
"gb": {
"count": 957,
"percent": 5.3,
"lcp": 1228,
"fid": 0,
"cls": 0
},
...
}
}
}

You can use the following values for timing and you can combine them by adding a plus sign between them.

MetricDescription
lcpLargest Contentful Paint
fcpFirst Contentful Paint
fpFirst Paint
fidFirst Input Delay
inpInteraction to Next Paint
clsCumulative Layout Shift
ttfbTime To First Byte
dns_timeDNS lookup time
connect_timeHTTP connection time
server_timeServer wait time
transfer_timeResponse transfer time
dom_timeDOM rendering time
fully_loaded_timeFully loaded time
transfer_sizeResponse size in bytes
dom_sizeSize of the HTML in the rendered page
dom_elementsNumber of DOM element in the rendered page