Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

@reactor/analytics — reactoranalytics

@reactor/analytics


@reactor/analytics / ReactorAnalytics

Defined in: index.ts:188

Reactor Analytics client.

Provides methods for tracking events, identifying users, and managing consent.

new ReactorAnalytics(config): ReactorAnalytics

Defined in: index.ts:198

AnalyticsConfig

ReactorAnalytics

alias(previousId, userId): void

Defined in: index.ts:312

Alias an anonymous ID to a user ID.

string

Previous anonymous ID.

string

User ID to alias to.

void


flush(): Promise<void>

Defined in: index.ts:348

Flush the event queue.

Promise<void>


getAnonymousId(): string

Defined in: index.ts:393

Get the current anonymous ID.

string


getSessionId(): string

Defined in: index.ts:407

Get the current session ID.

string


getUserId(): string | undefined

Defined in: index.ts:400

Get the current user ID.

string | undefined


identify(userId, traits?): void

Defined in: index.ts:284

Identify a user.

string

User ID.

UserTraits = {}

User traits (email, name, etc.).

void


optIn(): void

Defined in: index.ts:385

Opt in to tracking.

void


optOut(): void

Defined in: index.ts:376

Opt out of tracking.

void


page(name?, properties?): void

Defined in: index.ts:267

Track a page view.

string

Page name (optional).

EventProperties = {}

Additional properties.

void


reset(): void

Defined in: index.ts:335

Reset the user identity. Generates a new anonymous ID and clears the user ID.

void


track(event, properties?): void

Defined in: index.ts:245

Track an event.

string

Event name.

EventProperties = {}

Event properties.

void