Skip to main content

Analytics Scripting Object API

Classes

ClassDescription
AnalyticsAnalytics scripting object that captures business analytics events and performance timing measurements, forwarding them to multiple destinations.

Functions

FunctionDescription
getBAEventParametersGets the current business analytics event parameters
invalidateBasicInfoCache-
lrTrackGuardedThrottled 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.
markLrIdentifiedMarks LogRocket as already identified for the given user key. Call after an explicit logRocket.identify() to prevent ensureLrIdentified from re-identifying the same user.
resetLrIdentityResets the identify state so the next lrTrackGuarded call will re-identify from sessionStorage. Call on logout before clearing sessionStorage.
updateBAEventParametersUpdates the business analytics event parameters with new values