ZapAPI Docs
Get StartedConceptsAI GatewayGuidesPayment GatewaySDKAPI ReferenceResources
ApiAnalytics

Get analytics dashboard data

GET
/api/v1/analytics/dashboard

Authorization

bearer

Header Parameters

X-API-Version?string

API version for header-based versioning

Default"1"
Value in"1""2"

Response Body

Analytics data fetched successfully

response?unknownapplication/json
Example Request
curl -X GET 'http://localhost:3001/api/v1/analytics/dashboard'
Example Response
{  "status": "success",  "statusCode": 200,  "message": "Analytics fetched successfully",  "data": {    "overview": {      "totalVisitors": 1250,      "uniqueVisitors": 850,      "todayVisitors": 45,      "weekVisitors": 320,      "monthVisitors": 1150,      "returningVisitors": 400,      "newVisitors": 850    },    "topCountries": [      {        "country": "United States",        "countryCode": "US",        "count": 450      },      {        "country": "India",        "countryCode": "IN",        "count": 320      }    ],    "topCities": [      {        "city": "New York",        "country": "United States",        "count": 120      }    ],    "topPages": [      {        "page": "/",        "count": 500      },      {        "page": "/about",        "count": 250      }    ],    "browserStats": [      {        "browser": "Chrome",        "count": 800      },      {        "browser": "Safari",        "count": 300      }    ],    "osStats": [      {        "os": "Windows",        "count": 600      },      {        "os": "Mac OS",        "count": 400      }    ],    "deviceStats": [      {        "device": "desktop",        "count": 800      },      {        "device": "mobile",        "count": 400      }    ]  }}