Returns visitor acquisition and browsing metrics for the selected range.
/api/analytics/visitorsReturns visitor acquisition and browsing metrics for the selected range. The response compares new and returning visitors, lists the most common current pages, and returns an empty geo array when country data is unavailable. To use custom dates, send both start and end as ISO 8601 datetimes with offsets. Explicit boundaries override range; a single boundary is rejected. Date buckets are calculated in UTC. Periods with no data return the documented empty or zero-value response. Endpoints that support format=csv return a text/csv download. CSV export may require an eligible plan; JSON is the default.
pages.docs.apiRequirements.bearerApiKey pages.docs.apiRequirements.or pages.docs.apiRequirements.apiKeyHeader.analytics:readautomation_api)Query parameter. Range. Allowed values: 7d, 30d, 90d.
Query parameter. ISO 8601 date and time for start.
Query parameter. ISO 8601 date and time for end.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
{
"newVsReturning": [
{
"name": "New",
"value": 42
},
{
"name": "Returning",
"value": 17
}
],
"topPages": [
{
"page": "/pricing",
"views": 21
}
],
"geo": []
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}curl --request GET \
'https://api.convor.io/api/analytics/visitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer convor_sk_...'const response = await fetch("https://api.convor.io/api/analytics/visitors", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer convor_sk_..."
},
});
const contentType = response.headers.get("content-type") ?? "";
const data = response.status === 204
? null
: contentType.includes("json")
? await response.json()
: contentType.startsWith("text/")
? await response.text()
: await response.blob();
if (!response.ok) {
const message = typeof data === "object" && data !== null
&& "error" in data && typeof data.error === "object"
&& data.error !== null && "message" in data.error
? String(data.error.message)
: "Convor API request failed (" + response.status + ")";
throw new Error(message);
}
console.log(data);Was this page helpful?
Get first-response time and SLA breach rate
Calculates the time from the first visitor message to the first operator reply for conversations in the selected range.
Get operator performance metrics
Lists operator performance for the selected date range, including conversations handled and average first-response time.