Overview

The Session Activity endpoint provides detailed insights into individual user sessions, showing the complete timeline of events, page views, and interactions. Perfect for analyzing user behavior flows, debugging tracking issues, and understanding the customer journey within specific sessions.

Track every action a user takes during their visit - from page views and clicks to custom events and conversions - with full event properties and timestamps.

Endpoint

GET https://app.usehardal.com/api/websites/{signalId}/sessions/{sessionId}/activity

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Parameters

ParameterTypeRequiredDefaultDescription
signalIdstringYes-Your website signal ID (URL path)
sessionIdstringYes-Unique session identifier (URL path)
targetSignalIdstringNosignalIdTarget signal ID for analytics data
isHybridbooleanNofalseWhether this is a hybrid/self-hosted signal
orderBystringNotimestampField to order by: timestamp, name, type
orderstringNodescSort order: desc, asc
timezonestringNoEurope/IstanbulTimezone for date calculations
pageintegerNo1Page number for pagination (1-based)
limitintegerNo50Number of events to return per page

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.

Getting session IDs: Use the Sessions endpoint to retrieve session IDs, then drill down into individual sessions.

Start with analyzing a specific session:

Usage Examples

Response Fields

Main Data

  • events: Array of event objects representing all activities in the session
  • totalCount: Total number of events in this session
  • page: Current page number (1-based)
  • pageSize: Number of events per page
  • hasMore: Whether there are more events available

Event Object

  • id: Unique event identifier
  • type: Event category (pageview, custom, click, form, etc.)
  • name: Specific event name (page_view, purchase, add_to_cart, etc.)
  • timestamp: Event occurrence time formatted in specified timezone
  • url: Complete URL where the event occurred
  • path: URL path where the event occurred
  • title: Page title at the time of the event
  • referrer: Referrer URL for this specific event
  • properties: Custom event properties and tracking data

Event Properties

Event properties can include various types of data:

E-commerce Properties:

  • product_id: Product identifier
  • price: Product price
  • currency: Currency code
  • quantity: Item quantity
  • transaction_id: Order identifier

Marketing Properties:

  • utm_source: Traffic source
  • utm_medium: Marketing medium
  • utm_campaign: Campaign name
  • utm_content: Ad content
  • utm_term: Search terms

Custom Properties:

  • user_id: Authenticated user ID
  • email: User email address
  • form_name: Form identifier
  • element: Clicked element
  • category: Event category
  • Any custom properties you send with events

Pagination

The endpoint supports page-based pagination for sessions with many events:

# Get first page (events 1-20)
curl -X GET \
  "https://app.usehardal.com/api/websites/${SIGNAL_ID}/sessions/${SESSION_ID}/activity?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get second page (events 21-40)
curl -X GET \
  "https://app.usehardal.com/api/websites/${SIGNAL_ID}/sessions/${SESSION_ID}/activity?page=2&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get third page (events 41-60)
curl -X GET \
  "https://app.usehardal.com/api/websites/${SIGNAL_ID}/sessions/${SESSION_ID}/activity?page=3&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Performance Notes

  • Session activity queries are optimized for sessions with up to 1000 events
  • For very active sessions, use pagination with smaller page sizes (10-20 events)
  • Default page size of 50 events provides good balance between performance and completeness
  • Events are indexed by timestamp for fast chronological ordering
  • Consider filtering by event type when analyzing specific interactions