Events API
Get detailed event data with filtering, grouping, and pagination support
Overview
The Events endpoint provides access to detailed event data from your website analytics. Track custom events, page views, and user interactions with powerful filtering, grouping, and pagination capabilities.
Perfect for analyzing user behavior, conversion funnels, and custom event tracking across your website.
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) |
timeframe | string | No | custom | Time period: today , yesterday , last7days , last30days , custom |
startDate | string | No | - | Start date for timeframe (ISO format) |
endDate | string | No | - | End date for timeframe (ISO format) |
timezone | string | No | Europe/Istanbul | Timezone for date calculations (e.g., Asia/Istanbul ) |
groupBy | string | No | - | Group results: event , date |
limit | integer | No | 1000 | Number of events to return (pagination) |
offset | integer | No | 0 | Number of events to skip (pagination) |
targetSignalId | string | No | signalId | Target signal ID for analytics data |
isHybrid | boolean | No | false | Whether this is a hybrid/self-hosted signal |
eventName | string | No | - | Filter by specific event name |
sessionId | string | No | - | Filter by specific session ID |
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 Events Request
Basic Events Request
Get recent events from your website.
Response:
Usage Examples
Today's Events
Today's Events
Get all events that happened today.
Response:
Use Case: Daily event monitoring, real-time activity tracking
Yesterday's Events
Yesterday's Events
Get events from the previous day.
Use Case: Daily reporting, yesterday’s performance analysis
Last 7 Days Events
Last 7 Days Events
Get events from the past week.
Use Case: Weekly trend analysis, user behavior patterns
Last 30 Days Events
Last 30 Days Events
Get events from the past month.
Use Case: Monthly reporting, long-term trend analysis
Custom Date Range
Custom Date Range
Get events from a specific date range.
Use Case: Campaign analysis, specific period reporting
Event Counts (Group by Event)
Event Counts (Group by Event)
Get aggregated event counts by event type.
Response:
Use Case: Event performance analysis, conversion funnel tracking
Filter by Event Name
Filter by Event Name
Get only purchase events.
Use Case: Conversion tracking, specific event analysis
Response Fields
Event Object
id
: Unique event identifierwebsite_id
: Website/signal IDsession_id
: Session identifierhostname
: Website hostnamebrowser
: Browser name (Chrome, Safari, Firefox, etc.)os
: Operating system (Windows, macOS, Linux, etc.)device
: Device type (Desktop, Mobile, Tablet)country
: Country nameurl
: Page URL where event occurredreferrer
: Referrer URLpage_title
: Page titleevent_type
: Event type (pageview, custom, etc.)event_name
: Specific event namecreated_at
: Event timestamp
Pagination Object
total
: Total number of events availablelimit
: Number of events requestedoffset
: Number of events skippedhasMore
: Whether there are more events availabletotalPages
: Total number of pages availablecurrentPage
: Current page number (1-based)
Event Count Object (when groupBy=event)
name
: Event namecount
: Total number of occurrencesunique_visitors
: Number of unique visitors who triggered this event
Pagination
The events endpoint supports pagination through limit
and offset
parameters:
Pagination Examples
Pagination Examples
Navigate through large event datasets efficiently.
Pagination Response:
Timeframe Options
today
: Current day from 00:00 to nowyesterday
: Previous day (full 24 hours)last7days
: Last 7 days including todaylast30days
: Last 30 days including todaycustom
: Custom date range (requiresstartDate
andendDate
)
Usage Notes
Performance: Default limit is 1000 events if not specified. For large datasets, use pagination to avoid timeouts.
Ordering: Events are ordered by created_at
timestamp in descending order (newest first).
Grouping: When groupBy=event
is used, individual events are not returned; only event counts.
- The
timezone
parameter affects how dates are interpreted and returned - All timestamps in responses are formatted according to the specified timezone
- Pagination uses 1-based page numbering in the response
- Large datasets may require multiple paginated requests to retrieve all events