Full Configuration
Required Options
Your Refine API key. Obtain from Dashboard → Settings → API Keys.
Your organization UUID. Find at Dashboard → Settings → Organization.
The catalog to search. Find at Dashboard → Catalogs.
Optional Options
Application type identifier. Values:
'web', 'mobile', 'server'.Enable debug logging. Logs all requests, responses, and events to the console.
Global error handler called for all SDK errors. Useful for centralized error reporting.
Events Configuration
Control how events are batched, stored, and transmitted.Enable or disable event tracking entirely.
Number of events to batch before sending. Lower values = more frequent requests but fresher data.
Maximum time (ms) between flushes, regardless of batch size.
Maximum events to queue. Oldest events are dropped when exceeded.
Retry attempts for failed event submissions.
Where to persist the event queue. Options:
'localStorage'— Survives page refreshes (browser only)'sessionStorage'— Cleared on tab close'memory'— No persistence (lost on refresh)'none'— Disable persistence
Session timeout in milliseconds. Default is 30 minutes (30 * 60 * 1000).
Privacy Configuration
GDPR and privacy-related options.When
true, disables tracking if the browser’s Do Not Track setting is enabled.When
true, IP addresses are anonymized before storage.When
true, event tracking is paused until consent is granted via the ConsentPlugin.Configuration Patterns
Development vs Production
GDPR Compliance
High-Volume Sites
For high-traffic applications, increase batch size and queue limits:Server-Side Rendering
For SSR environments where localStorage isn’t available:Updating Configuration
The SDK doesn’t support runtime configuration changes. Create a new instance if you need different settings:Next Steps
Text Search
Start searching
Plugins
Extend SDK functionality