@reactor/analytics — analyticsconfig
@reactor/analytics / AnalyticsConfig
Interface: AnalyticsConfig
Section titled “Interface: AnalyticsConfig”Defined in: index.ts:19
@reactor/analytics - Product analytics SDK for Reactor
Example
Section titled “Example”import { ReactorAnalytics } from '@reactor/analytics';
const analytics = new ReactorAnalytics({ projectKey: 'pk_...', endpoint: 'https://api.reactor.cloud/analytics/v1',});
analytics.track('button_clicked', { button_id: 'signup' });analytics.identify('user_123', { email: 'user@example.com' });Properties
Section titled “Properties”autoCapture?
Section titled “autoCapture?”
optionalautoCapture?:boolean
Defined in: index.ts:33
Auto-capture click interactions (opt-in).
autoCaptureSelector?
Section titled “autoCaptureSelector?”
optionalautoCaptureSelector?:string
Defined in: index.ts:35
CSS selector for auto-capture targets.
autoErrors?
Section titled “autoErrors?”
optionalautoErrors?:boolean
Defined in: index.ts:31
Auto-capture errors with fingerprint coalescing.
autoPageview?
Section titled “autoPageview?”
optionalautoPageview?:boolean
Defined in: index.ts:29
Auto-capture pageviews.
batchSize?
Section titled “batchSize?”
optionalbatchSize?:number
Defined in: index.ts:25
Batch events before sending.
debug?
Section titled “debug?”
optionaldebug?:boolean
Defined in: index.ts:43
Debug mode (logs events to console).
endpoint
Section titled “endpoint”endpoint:
string
Defined in: index.ts:23
Analytics API endpoint.
errorDedupeWindow?
Section titled “errorDedupeWindow?”
optionalerrorDedupeWindow?:number
Defined in: index.ts:37
Error deduplication window in ms (default 5000).
flushInterval?
Section titled “flushInterval?”
optionalflushInterval?:number
Defined in: index.ts:27
Flush interval in milliseconds.
persistence?
Section titled “persistence?”
optionalpersistence?:boolean
Defined in: index.ts:39
Persist anonymous ID to localStorage.
projectKey
Section titled “projectKey”projectKey:
string
Defined in: index.ts:21
Project key (X-Reactor-Project-Key header).
storageKey?
Section titled “storageKey?”
optionalstorageKey?:string
Defined in: index.ts:41
Storage key for persistence.