Skip to main content
Radar delivers tracked data to your backend using webhooks. Before you can receive events, you must configure a webhook endpoint. You can choose between two delivery modes depending on your use case.

Choosing a Delivery Mode

Event-Based Delivery

Events are pushed to your webhook as they occur, in near real-time.Pros:
  • Low latency for real-time applications.
  • Immediate access to individual events.
Tradeoffs:
  • Requires you to perform session stitching.
  • You must calculate session-level metrics (like time on page).

Session-Based Delivery (Recommended)

Events are grouped by session and sent in a single payload after the session ends (typically 30 minutes of inactivity).Pros:
  • Session metrics are pre-computed for you.
  • Data is fully enriched and ready for analysis.
  • Simpler to process and store.
Event-based and session-based payloads share the same structure. The difference is that event-based payloads contain a single event in the events array and are sent in near real-time, while session-based payloads contain all events from the session and are sent after 30 minutes of inactivity.

Selecting your delivery mode

Set the delivery mode with the event_aggregation field (per_session or per_event) on the webhook configuration endpoint. See the API Reference for the request and response details.
Need an identification during a session rather than waiting for a webhook? Call the Identify company for a session endpoint (POST /radar/operator/v1/tracking-scripts/{trackingScriptId}/company/find) with the visitor’s session_uuid.By default this lookup only covers sessions from the last 2 days. To identify an older session, pass the optional since field — an ISO 8601 date (UTC) naming the day the session took place. The lookup is then scoped to that single calendar day. The date may be up to 30 days in the past and cannot be in the future.
cURL

Example: Pageview Event (Session-Based)

This example shows a session payload containing a single $pageview event. Note the enriched context and pre-computed engagement times.
Pageview Event

Example: Identified Visitor (Session-Based)

When a visitor is identified — for example via the identify SDK method or an sn_email query parameter — user_properties includes their $email and any $traits at both the session and event level.
Identified Visitor

Example: Form Submit Event (Session-Based)

This example shows how a form submit event appears in a session payload.
Form Submit Event

Example: Custom Event (Session-Based)

This example shows how a custom track event appears in a session payload. The data from the second argument of the track call is nested inside event_properties.
Custom Event

Example: Click Event (Session-Based)

This example shows how a click event appears in a session payload when clickTracking is enabled.
Click Event

Example: Download Event (Session-Based)

This example shows how a download event appears in a session payload when downloadTracking is enabled.
Download Event