Sublyzer SDK Reference
Complete documentation for all Sublyzer SDKs — JavaScript, TypeScript, Node.js, Python, PHP, Go, C++, React Native, Flutter, Swift, and Kotlin.
SDK Reference
Sublyzer provides native SDKs for 11 platforms. Each SDK auto-initializes, captures errors, sends events, and flushes data automatically. Use the tabs below to see documentation for your framework.
Installer (.exe)
Download — Windows app, writes SDK files into your project automatically.
SDK Customizer
https://www.sublyzer.com/sdk-customizer — generate & download SDK for any supported language.
JavaScript SDK (Browser)
Drop-in script for any website. Captures errors, performance metrics, page views, clicks, form submissions, and device info automatically.
Best for: Static websites, WordPress, vanilla JS projects, or any HTML page.
Installation
Option A — Installer or SDK Customizer: download sublyzer-installer.exe or generate files at https://www.sublyzer.com/sdk-customizer (JavaScript → Browser).
Option B — Script tag (CDN):
<script src="https://www.sublyzer.com/sublyzer.js" data-integration-code="YOUR_INTEGRATION_CODE" defer ></script>
Option C — Self-hosted: place downloaded sublyzer.js in your static folder:
<script src="/sdks/sublyzer.js" data-integration-code="YOUR_INTEGRATION_CODE" defer></script>
NPM: npm install @sublyzer/browser — see API Reference.
Configuration
// sublyzer.config.js
module.exports = {
integrationCode: 'YOUR_24_CHAR_CODE',
apiUrl: 'https://sublyzer-backend-production.up.railway.app',
debug: false,
};API
// Track a custom event
Sublyzer.trackEvent('purchase', { plan: 'pro', amount: 29.99 });
// Track an error manually
Sublyzer.trackError('Payment failed', error.stack);
// Identify a user (links events to a specific user)
Sublyzer.identify('user_12345');
// Force flush queued events
Sublyzer.flush();What's tracked automatically
- JavaScript errors & unhandled promise rejections
- Web Vitals (LCP, CLS)
- Page load performance (DOM, TTFB, DNS, TCP)
- Page views (including SPA navigation)
- Click tracking (tag, id, class, text, coordinates)
- Form submissions
- Device & browser info
Common Features (All SDKs)
- Auto-initialization — SDK validates the integration code on startup
- Error tracking — Uncaught exceptions and errors are captured automatically
- Event batching — Events queue locally and flush in batches (threshold: 10-20 events)
- Auto-flush — Queued events are sent every 30 seconds automatically
- Graceful shutdown — Events are flushed before the process/app exits
- Session & User IDs — Persistent identifiers for tracking across sessions
- identify() — Link events to a specific user ID
- Retry on failure — Failed flushes re-queue events for the next attempt
Need help? Join our Discord.