lrTrackGuarded()
function lrTrackGuarded(event: string, eventEx: Record<string, unknown>): void;
Throttled wrapper around logRocket.track().
- If LogRocket is not yet available, buffers the event (up to LR_PENDING_QUEUE_MAX) and replays it once LR loads.
- Automatically ensures the user is identified to LogRocket via ensureLrIdentified before the first track call.
- Allows up to LR_THROTTLE_MAX_PER_WINDOW calls per LR_THROTTLE_WINDOW_MS for the same event+payload combination; excess calls are silently dropped.
- Warns when eventEx carries more than LR_PROPERTY_WARN_THRESHOLD properties, since excess properties consume the 2,000 total-property session budget.
Parameters
event
string
event name
eventEx
Record<string, unknown>
event properties
Returns
void