Overview

The Event Data Fields endpoint provides comprehensive access to your event data with all custom fields and attribution information. Perfect for analyzing conversion events, e-commerce transactions, user interactions, and building detailed event analytics with marketing attribution.

Get granular insights into user behavior with full event properties, UTM attribution, and flexible filtering options for any event type you track.

Endpoint

GET https://app.usehardal.com/api/websites/{signalId}/event-data/fields

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Parameters

ParameterTypeRequiredDefaultDescription
signalIdstringYes-Your website signal ID (URL path)
targetSignalIdstringYes-Target signal ID for analytics data
isHybridbooleanYes-Whether the signal uses hybrid tracking
eventNamestringYes-Name of the event to fetch data for
startDatestringNo-Start date for data range (ISO format)
endDatestringNo-End date for data range (ISO format)
timeframestringNocustomTime period: today, yesterday, last7days, last30days, custom
timezonestringNoUTCTimezone for date calculations (URL encoded)
attribution_modelstringNolast_clickAttribution model (see below)
attribution_windownumberNo30Attribution window in days
limitnumberNo50Number of events to return
offsetnumberNo0Pagination offset

Quick Start

Environment Setup

Finding your signal ID: Go to your Hardal dashboard → select your project → view the signal ID in settings.

Finding your API key: Go to your Hardal dashboard → select your signal → Settings → API Keys.

Start with a simple request to get purchase event data:

Usage Examples

Response Fields

Standard Fields

  • session_id: Unique session identifier
  • event_id: Unique event identifier
  • created_at: Event timestamp (ISO format)
  • event_name: Name of the event

Attribution Fields

  • source: UTM source or traffic source
  • medium: UTM medium or traffic medium
  • campaign: UTM campaign name

Custom Event Fields

The response includes all custom fields tracked with the event:

E-commerce Events

  • value: Purchase amount or event value
  • currency: Currency code (USD, EUR, TRY, etc.)
  • product_id: Product identifier
  • product_name: Product name or title
  • category: Product category
  • quantity: Number of items
  • discount: Discount amount applied

User Events

  • user_email: User email address
  • user_id: User identifier
  • user_name: User display name
  • subscription_type: Type of subscription

Marketing Events

  • promotion_id: Promotion identifier
  • coupon_code: Applied coupon code
  • affiliate_id: Affiliate tracking ID

Pagination Object

  • total: Total number of events matching criteria
  • totalPages: Total number of pages
  • currentPage: Current page number (1-based)
  • limit: Number of events per page
  • offset: Current pagination offset
  • hasNextPage: Whether more pages exist
  • hasPreviousPage: Whether previous pages exist

Attribution Models

Choose the attribution model that best fits your marketing analysis:

ModelDescriptionBest For
last_clickCredit to the last touchpoint before eventDirect response campaigns
first_clickCredit to the first touchpoint in journeyBrand awareness campaigns
any_clickCredit to any touchpoint that influenced eventGeneral attribution
linearEqual credit across all touchpointsMulti-touch campaigns
time_decayMore credit to recent touchpointsComplex customer journeys

Data Type Handling

The endpoint automatically handles different data types in your custom fields:

Performance Considerations

Query Performance Notice: This endpoint performs complex queries with custom fields and attribution modeling. Query time increases significantly with larger date ranges.

For optimal performance:

  • Use shorter date ranges (1-7 days) for detailed event analysis
  • Use longer date ranges (30+ days) sparingly for historical exports
  • Consider smaller limit values (10-50) for large datasets
  • Peak performance with today and yesterday timeframes
  • Filter by specific eventName to reduce query complexity

Usage Notes

  1. Event Name Required: Must specify an eventName parameter to filter events
  2. Custom Fields: All custom event properties are included in the response
  3. Attribution Data: Each event includes marketing attribution information
  4. Array Flattening: JSON arrays and objects are flattened with dot notation
  5. Timezone Support: All timestamps are converted to the specified timezone
  6. Pagination: Use limit and offset for paginated results
  7. Date Filtering: Supports both preset timeframes and custom date ranges