Active Users API
Get real-time active visitors data for your website
Overview
The Active Users endpoint provides real-time visibility into who’s currently browsing your website. Track active visitors, see what pages they’re viewing, and monitor live traffic patterns with customizable time windows.
Perfect for real-time dashboards, live visitor widgets, and monitoring traffic spikes as they happen.
Endpoint
Authentication
Include your API key in the Authorization header:
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
signalId | string | Yes | - | Your website signal ID (URL path) |
minutes | integer | No | 5 | Time window in minutes to look back for active visitors |
targetSignalId | string | No | signalId | Target signal ID for analytics data |
isHybrid | boolean | No | false | Whether this is a hybrid/self-hosted signal |
Quick Start
Environment Setup
Finding your signal ID: Go to your Hardal dashboard → select your project → view the signal ID.
Finding your API key: Go to your Hardal dashboard → select your signal → Settings → Security.
Start with a simple request:
Basic Request
Basic Request
Get active visitors from last 5 minutes.
Response:
Usage Examples
Real-time Dashboard (Last 5 minutes)
Real-time Dashboard (Last 5 minutes)
Perfect for live dashboards showing current website activity.
Response:
Use Case: Live visitor counter, real-time dashboard widgets
Extended Activity Window (Last 30 minutes)
Extended Activity Window (Last 30 minutes)
Get a broader view of recent activity for trend analysis.
Response:
Use Case: Traffic pattern analysis, identifying peak activity periods
Complete Configuration
Complete Configuration
Full parameter example with all options specified.
Response:
Use Case: Custom integrations with specific tracking requirements
Response Fields
Main Data
count
: Total number of active unique sessionsvisitors
: Array of individual active visitor objectspages
: Top pages currently being viewedreferrers
: Top referrer domains for active visitorsdevices
: Breakdown of device typescountries
: Geographic distribution of active visitors
Visitor Object
id
: Unique visitor identifier (session-based)sessionId
: Unique session identifierpage
: Current page URL pathtitle
: Current page titlereferrer
: Original referrer URLbrowser
: Browser name (Chrome, Safari, Firefox)os
: Operating system (Windows, macOS, Linux)device
: Device type (Desktop, Mobile, Tablet)country
: Country nameduration
: Total time spent on site in secondslastSeen
: Timestamp of last activity