Analytics API
Analytics Endpoints
Retrieve analytics data and statistics
Overview
These endpoints provide access to your website analytics data, including statistics, metrics, and time-series data for building custom dashboards and reports.
Analytics Endpoints
Usage Examples
Get Basic Website Statistics
Get Time-Series Data for Charts
Get Comprehensive Dashboard Metrics
Get Page Performance Data
Filtering Options
Most analytics endpoints support filtering by:
- Time Range:
startDate
,endDate
,timeframe
- Page:
url
parameter - Traffic Source:
referrer
parameter - Technology:
browser
,os
,device
parameters - Geography:
country
parameter
Time Intervals
When requesting time-series data, you can specify intervals:
minute
: Minute-by-minute data (for real-time)hour
: Hourly aggregationday
: Daily aggregationweek
: Weekly aggregationmonth
: Monthly aggregationauto
: Automatically choose based on date range
Predefined Timeframes
Use these convenient timeframes instead of custom date ranges:
today
: Current dayyesterday
: Previous daylast7days
: Last 7 dayslast30days
: Last 30 dayscustom
: Use withstartDate
andendDate