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:
Property | Description |
---|---|
key | The country code (ISO 3166-1, alpha-2) |
count | The number of page views from the country |
percent | The 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.
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 |