Get Performance by Dimension
Returns performance metrics broken down by a specific dimension (page, country, browser, etc.). Useful for identifying performance issues on specific pages or for specific user segments.
GET /api/sites/:site/performance/by-dimensionReturns performance metrics broken down by a specific dimension (page, country, browser, etc.). Useful for identifying performance issues on specific pages or for specific user segments.
Path Parameters
Prop
Type
Query Parameters
Accepts all Common Parameters plus the following:
Prop
Type
Response
Prop
Type
totalCount is the number of distinct dimension values. Rows with an empty dimension value are left out.
DimensionPerformance Object
Each object has the dimension value, event_count, and the fields below for each metric (lcp, cls, inp, fcp, ttfb); LCP is shown. LCP, INP, FCP and TTFB are in milliseconds; CLS is unitless. Averages and percentiles are null when no load for that value reported the metric.
Prop
Type
curl -X GET "https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10" \
-H "Authorization: Bearer your_api_key_here"const response = await fetch(
'https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10',
{
headers: {
'Authorization': 'Bearer your_api_key_here'
}
}
);
const data = await response.json();import requests
response = requests.get(
'https://app.rybbit.io/api/sites/1/performance/by-dimension',
params={
'dimension': 'pathname',
'sort_by': 'lcp_p75',
'sort_order': 'desc',
'limit': 10
},
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your_api_key_here'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);require 'net/http'
require 'json'
uri = URI('https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)let client = reqwest::Client::new();
let res = client
.get("https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10")
.header("Authorization", "Bearer your_api_key_here")
.send()
.await?;
let data: serde_json::Value = res.json().await?;HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10"))
.header("Authorization", "Bearer your_api_key_here")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var response = await client.GetAsync("https://app.rybbit.io/api/sites/1/performance/by-dimension?dimension=pathname&sort_by=lcp_p75&sort_order=desc&limit=10");
var data = await response.Content.ReadAsStringAsync();{
"data": {
"data": [
{
"pathname": "/dashboard",
"event_count": 12450,
"lcp_avg": 2850,
"lcp_p50": 2400,
"lcp_p75": 3200,
"lcp_p90": 4100,
"lcp_p99": 6500,
"lcp_count": 12380,
"lcp_good": 6900,
"lcp_poor": 2150,
"cls_avg": 0.08,
"cls_p50": 0.05,
"cls_p75": 0.12,
"inp_avg": 180,
"inp_p50": 150,
"inp_p75": 220,
"fcp_avg": 1450,
"fcp_p50": 1300,
"fcp_p75": 1700,
"ttfb_avg": 520,
"ttfb_p50": 480,
"ttfb_p75": 680
},
{
"pathname": "/reports",
"event_count": 8920,
"lcp_avg": 2650,
"lcp_p50": 2200,
"lcp_p75": 2900,
"lcp_p90": 3800,
"lcp_p99": 5800
}
],
"totalCount": 156
}
}