Comprehensive web analytics with real-time tracking, historical reports, session replay, heatmaps, Core Web Vitals, and form analytics.
Common query parameters for all analytics endpoints:
period:7d,30d,90d,3m,6m,12mstartDate/endDate: Custom date range (YYYY-MM-DD)compare:previous(previous period) oryoy(year-over-year)Filter dimensions:
browser,os,device,country,city,referrer,traffic_source,language,entry_page,utm_source,utm_medium,utm_campaign,path
23 endpoints
GET /analytics/settings
Get analytics settings
Returns tracking configuration (excluded paths, excluded IPs, data retention).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
PUT /analytics/settings
Update analytics settings
Updates tracking exclusions and data retention settings.
Request Body
Content-Type: application/json
Field | Type | Required | Description |
|---|---|---|---|
| boolean | No | Boolean |
| number | No | Between 7 and 365 |
| number | No | Between 30 and 3650 |
| string[] | No | Array of strings |
| string[] | No | Array of strings |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Validation error |
GET /analytics/realtime
Get real-time visitors
Returns the number of active visitors and which pages they are currently viewing. Active = had an event in the last 5 minutes.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/realtime/pageviews
Get real-time pageviews chart
Returns pageview counts per minute for the last 30 minutes.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/engagement
Get engagement metrics
Returns engagement data: rage clicks, dead clicks, outbound link clicks, and file downloads.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/forms-analytics
Get form analytics
Returns form interaction metrics: form starts, submissions, abandonment rate, and average completion time per form.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/overview
Get analytics overview
Returns key metrics for the selected period: unique visitors,
total pageviews, average visit duration, bounce rate, and
pages per session. Includes comparison data if compare is set.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Examples
curl "https://api.lynkow.com/v1/analytics/overview?period=30d&compare=previous" \
-H "Authorization: Bearer $API_TOKEN"GET /analytics/chart
Get time-series chart data
Returns time-series data for visualization (visitors, pageviews, sessions per day/hour). Granularity adjusts automatically based on the selected period.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/pages
Get page analytics
Returns per-page statistics (views, unique visitors, avg. time, bounce rate).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/referrers
Get traffic sources
Returns referrer breakdown (direct, search, social, other sites).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/countries
Get geographic data (countries)
Returns visitor counts by country.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/cities
Get geographic data (cities)
Returns visitor counts by city.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/devices/screens
Get screen size distribution
Returns visitor counts by screen resolution.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/devices
Get device breakdown
Returns visitor counts by device type (desktop, mobile, tablet) and browser/OS.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/campaigns
Get UTM campaign data
Returns visitor and conversion data grouped by UTM parameters (source, medium, campaign, term, content).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/cwv
Get Core Web Vitals
Returns Core Web Vitals metrics: LCP (Largest Contentful Paint), FID (First Input Delay), CLS (Cumulative Layout Shift), TTFB (Time to First Byte), INP (Interaction to Next Paint).
Values include p75 percentiles and Good/Needs Improvement/Poor distribution.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/export
Export analytics as CSV
Exports raw analytics data for the selected period and filters.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/filter-values
Get available filter values
Returns the distinct values available for each filter dimension (browsers, operating systems, countries, etc.). Useful for building filter dropdowns in a UI.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/sessions
List visitor sessions
Returns paginated visitor sessions with metadata (entry page, duration, pages viewed, device, location).
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/sessions/heatmap
Get sessions heatmap
Returns session frequency by day of week and hour of day. Useful for visualizing when your site gets the most traffic.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
GET /analytics/sessions/:sessionId
Get session detail
Returns the full event timeline for a single session: pageviews, clicks, scroll events, and timing data.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
| path | string | Yes | Analytics session ID |
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
| Not found |
GET /analytics/heatmap
Get click heatmap data
Returns click coordinates and element click counts for a specific page. Use to generate visual heatmap overlays.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |
Notes: - Requires
pathquery parameter to specify the page.
GET /analytics/heatmap/scroll
Get scroll depth data
Returns scroll depth percentages for a specific page. Shows what percentage of visitors reached each scroll depth threshold.
Responses
Status | Description |
|---|---|
| Successful response |
| Unauthorized — invalid or missing API token |
| Forbidden — insufficient permissions |