MetricPayload
Upgather Analytics / MetricPayload
Interface: MetricPayload
Base payload interface for all metrics tracked in the analytics system.
Remarks
This interface defines the minimum required fields for all event payloads. Every event must include a URL, plus any additional event-specific properties. The open shape allows for flexible event data while ensuring a consistent base structure.
Example
import { MetricPayload } from '@upgather/analytics';
const payload: MetricPayload = {
url: 'https://app.upgather.com/dashboard',
referrer: 'https://google.com',
sessionId: 'sess-123456',
timestamp: Date.now()
};
Extended by
Indexable
[key: string]: unknown
Properties
url
url:
string
The canonical page URL where the event occurred. For client-side events, this should be window.location.href or similar. For server-side events, provide the most specific URL relevant to the action.