Configuration Options
The Solute SDK can be configured with a variety of options to customize its behavior.Basic Configuration
Configuration Reference
Required Options
Your Solute API key. Get this from your Solute dashboard.
Optional Options
The API host URL. Defaults to
https://api.solute.dev.Enable debug logging. Useful for development. Logs all events and API calls to the console.
Disable the SDK entirely. All methods will be no-ops. Useful for testing or feature flags.
Automatically track page views on route changes (browser only).
Capture a page view event when the SDK initializes.
Capture personally identifiable information (PII) in events. Set to
false for GDPR compliance.Session timeout in milliseconds. Defaults to 30 minutes (1800000ms). A new session is created after this period of inactivity.
Pre-set the user ID. Useful if you already know the user ID at initialization time.
Pre-set the anonymous ID. Usually auto-generated, but can be set for consistency.
Error handler callback. Called when errors occur during event tracking or API calls.
Storage Configuration
Storage backend to use.
localStorage for browser, cookie for cross-domain tracking, memory for server-side or testing.Prefix for all storage keys. Useful to avoid conflicts with other libraries.
Queue Configuration
Maximum number of events to queue before dropping old events. Prevents memory issues.
Automatic flush interval in milliseconds. Events are sent to the API every N milliseconds. Defaults to 10 seconds.
Number of events to accumulate before automatically flushing. Events are sent when this many events are queued.
Maximum number of events to send in a single batch request.
Feature Flags Configuration
Enable feature flags and A/B testing functionality.
Feature flags refresh interval in milliseconds. Defaults to 5 minutes (300000ms).
Automatically track exposure events when feature flags are evaluated.
HTTP Configuration
Request timeout in milliseconds. Defaults to 10 seconds.
Maximum number of retry attempts for failed requests.
Initial retry delay in milliseconds. Uses exponential backoff.
Additional HTTP headers to include in all requests.
