Skip to main content
GET
https://app.usehardal.com
/
api
/
websites
/
{websiteId}
/
events
Events API
curl --request GET \
  --url https://app.usehardal.com/api/websites/{websiteId}/events \
  --header 'Authorization: Bearer <token>'
{
  "events": [
    {
      "id": "evt_123456789",
      "website_id": "cm6gihhlq000aue9wkelb4ay3",
      "session_id": "sess_abc123",
      "hostname": "example.com",
      "browser": "Chrome",
      "os": "Windows",
      "device": "Desktop",
      "country": "Turkey",
      "url": "/products/item-1",
      "referrer": "https://google.com",
      "page_title": "Product Details",
      "event_type": "pageview",
      "event_name": "page_view",
      "created_at": "2024-01-15T10:30:00+03:00"
    },
    {
      "id": "evt_123456790",
      "website_id": "cm6gihhlq000aue9wkelb4ay3",
      "session_id": "sess_def456",
      "hostname": "example.com",
      "browser": "Safari",
      "os": "macOS",
      "device": "Desktop",
      "country": "United States",
      "url": "/checkout",
      "referrer": "/products/item-1",
      "page_title": "Checkout",
      "event_type": "custom",
      "event_name": "purchase",
      "created_at": "2024-01-15T10:32:00+03:00"
    }
  ],
  "pagination": {
    "total": 1250,
    "limit": 10,
    "offset": 0,
    "hasMore": true,
    "totalPages": 125,
    "currentPage": 1
  }
}
Get detailed event data from your website analytics. Track custom events, page views, and user interactions with powerful filtering, grouping, and pagination capabilities.
websiteId
string
required
Your website signal ID
timeframe
string
default:"custom"
Time period: today, yesterday, last7days, last30days, custom
startDate
string
Start date for timeframe (ISO format)
endDate
string
End date for timeframe (ISO format)
timezone
string
default:"Europe/Istanbul"
Timezone for date calculations (e.g., Asia/Istanbul)
groupBy
string
Group results: event, date
limit
integer
default:"1000"
Number of events to return (pagination)
offset
integer
default:"0"
Number of events to skip (pagination)
targetSignalId
string
default:"websiteId"
Target signal ID for analytics data (use inherited signal ID if different from websiteId, otherwise same as websiteId)
isHybrid
boolean
default:"false"
Whether this is a hybrid/self-hosted signal
eventName
string
Filter by specific event name
sessionId
string
Filter by specific session ID
{
  "events": [
    {
      "id": "evt_123456789",
      "website_id": "cm6gihhlq000aue9wkelb4ay3",
      "session_id": "sess_abc123",
      "hostname": "example.com",
      "browser": "Chrome",
      "os": "Windows",
      "device": "Desktop",
      "country": "Turkey",
      "url": "/products/item-1",
      "referrer": "https://google.com",
      "page_title": "Product Details",
      "event_type": "pageview",
      "event_name": "page_view",
      "created_at": "2024-01-15T10:30:00+03:00"
    },
    {
      "id": "evt_123456790",
      "website_id": "cm6gihhlq000aue9wkelb4ay3",
      "session_id": "sess_def456",
      "hostname": "example.com",
      "browser": "Safari",
      "os": "macOS",
      "device": "Desktop",
      "country": "United States",
      "url": "/checkout",
      "referrer": "/products/item-1",
      "page_title": "Checkout",
      "event_type": "custom",
      "event_name": "purchase",
      "created_at": "2024-01-15T10:32:00+03:00"
    }
  ],
  "pagination": {
    "total": 1250,
    "limit": 10,
    "offset": 0,
    "hasMore": true,
    "totalPages": 125,
    "currentPage": 1
  }
}