Data Sending
Send events and data to Hardal Analytics
Overview
Hardal Analytics API provides a simple REST API for tracking events and identifying users across your websites and mobile applications.
Hardal Analytics is cookieless, first-party and privacy-friendly, compliant with GDPR and KVKK regulations.
API Endpoint
Required Header:
Content-Type: application/json
Signal ID: Your website or app ID from the Hardal dashboard (required for all requests).
API Structure
Every request follows this structure:
Structure Explanation
type
: Defines the request type. Use"event"
for tracking events or"identify"
for user identification.payload
: Contains all the event information including required fields and optional custom data.data
: Optional object inside payload for your custom parameters. Only include if you have custom data to send.
Send Event Data
Basic Event
Send an event with just the event name and required parameters.
Event Names: Use consistent naming conventions like page_view
, button_click
, form_submit
.
Event with Custom Parameters
Add custom data to your events using the data
object.
Custom Data: Place any custom parameters inside the data
object.
Identify Users
Link user identity to their sessions and activity.
For ATT (App Tracking Transparency) compliance, you can hash or redact PII data in the Hardal UI.
Implementation Guide
Required Fields
website
: Your Signal ID. You can use also for app measurement.name
: Event name. For example, “purchase
” (use “identify
” for identify calls)url
: Current page or screen URLtitle
: Page or screen titledevice_type
: “desktop”, “mobile”, or “tablet”platform
: “web”, “app”, or “server”
Response Codes
200
: Success400
: Invalid request401
: Invalid Signal ID