Skip to main content

AnalyticsConfig

The main configuration interface for initializing the MentiQ Analytics SDK.

Properties

string
required
Your MentiQ Analytics API key used for authentication.
string
required
The unique identifier for your project in MentiQ Analytics.
string
Custom API endpoint URL. Defaults to MentiQ’s standard endpoint if not specified.
boolean
Enable debug mode for verbose logging. Useful for development and troubleshooting.
string
Initial user ID to associate with analytics events.
number
Time in milliseconds before a session expires due to inactivity.
number
Number of events to batch before sending to the server.
number
Interval in milliseconds for automatically flushing queued events.
boolean
Automatically track page views when enabled.
boolean
Enable automatic tracking of web performance metrics.
boolean
Enable heatmap data collection for click and scroll tracking.
boolean
Enable session recording functionality.
boolean
Automatically track JavaScript errors and unhandled promise rejections.
number
Maximum number of events to queue before forcing a flush.
number
Number of retry attempts for failed event submissions.
number
Delay in milliseconds between retry attempts.
boolean
Enable A/B testing functionality.
ABTestConfig
Configuration options for A/B testing features.

ABTestConfig

Configuration options for A/B testing functionality.

Properties

boolean
Enable or disable A/B testing functionality.
number
Cache assignment for this many milliseconds. Default: 5 minutes (300000ms).
boolean
Automatically track when a user is exposed to a variant.

AssignmentOptions

Options for experiment assignment requests.

Properties

string
User ID to use for assignment. Overrides the SDK’s current user ID.
string
Anonymous ID to use for assignment. Overrides the SDK’s current anonymous ID.
boolean
Ignore cache and fetch a fresh assignment from the server.