API Reference
GET Overview
Retrieve aggregate analytics for the authenticated site.
GET Overview
GET https://api.faurya.com/api/v1/analytics/overview
Retrieve aggregate analytics for the site attached to your API key. Requires Bearer Token authentication.
Query parameters
period(string):day,week,month,year, orall.startDateorstartAt(string): Custom range start. Must be used with an end date.endDateorendAt(string): Custom range end. Must be used with a start date.device(string): Filter by device type.os(string): Filter by operating system.browser(string): Filter by browser.path(string): Filter by page path. URL-encoded values are decoded.country(string): Filter by country.city(string): Filter by city.utm(string): Filter by UTM/campaign query. URL-encoded values are decoded.referrer(string): Filter by referrer.hostname(string): Filter by hostname.goal(string): Filter by goal name.
Response
200 OK: Returns the analytics overview payload.401 Unauthorized: Missing or invalid API key.404 Not Found: Site not found.
Example request
const response = await fetch(
"https://api.faurya.com/api/v1/analytics/overview",
{
headers: {
Authorization: `Bearer ${process.env.FAURYA_API_KEY}`,
},
},
);
const result = await response.json();Success response
{
"success": true,
"data": {
"source": {},
"url": {},
"location": {},
"tech": {}
}
}