Analytics
Beacon tracks user interactions with fire-and-forget analytics events. Events are sent to the Dial platform and viewable in the Beacon Console analytics dashboard.
Configuration
{
"analytics": {
"enabled": true,
"endpoint": "https://api.dial.wtf/v1/beacon/events",
"sampleRate": 1
}
}| Property | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable or disable event tracking |
endpoint | string (URL) | "https://api.dial.wtf/v1/beacon/events" | Analytics ingestion endpoint |
sampleRate | number (0-1) | 1 | Fraction of events to send (e.g., 0.5 = 50% sampling) |
Events
| Event | Trigger |
|---|---|
beacon_viewed | Widget script loaded on the page |
beacon_opened | User clicked the floating button to open the panel |
quick_action_clicked | User clicked a quick action button |
verify_started | Wallet verification flow initiated |
verify_completed | Wallet verification succeeded |
handoff_email_submitted | User submitted their email via the handoff form |
handoff_calendar_clicked | User clicked the calendar booking link |
message_submitted | User sent a message via chat |
Event Payload
Each event includes:
{
event: string; // Event type (e.g., "beacon_opened")
projectId: string; // Your Beacon project ID
env: string; // "prod" or "staging"
beaconVersion: string; // Beacon script version
origin: string; // Page origin (e.g., "https://example.com")
path: string; // Page path (e.g., "/pricing")
ts: number; // Unix timestamp in milliseconds
anonId: string; // Stable anonymous visitor ID (UUID)
meta?: { // Optional metadata
actionId?: string; // Quick action ID (for quick_action_clicked)
scopes?: string; // Verification scopes (for verify events)
}
}Anonymous Visitor ID
Beacon generates a stable anonymous ID (anonId) per browser using crypto.randomUUID() and stores it in localStorage under dial_beacon_anon_id. This allows tracking unique visitors across sessions without collecting any personal data.
Fire-and-Forget
Events are sent using navigator.sendBeacon() when available, falling back to fetch(). This ensures:
- Events don’t block the UI
- Events are sent even if the user navigates away
- Failed events are silently dropped (no retries, no error states)
Sampling
Use sampleRate to reduce event volume on high-traffic sites:
| Rate | Behavior |
|---|---|
1 | Send all events (default) |
0.5 | Send 50% of events |
0.1 | Send 10% of events |
0 | Disable all event sending |
Console Dashboard
The Beacon Console provides an analytics view with:
- Event counts by type
- Period filters (24h, 7d, 30d)
- Funnel visualization (viewed → opened → action clicked → verified)
See Console Guide for details.
Last updated on