SDK Guide

End‑to‑end guide to integrate the Sublyzer SDK. Covers installer, SDK Customizer, NPM packages, event collection, and best practices.

Quick overview

Sublyzer captures errors, performance, sessions, and security signals from your app. You need a 24-character integration code from the dashboard, then one of the install paths below.

Two ways to get SDK files

  • Installer (.exe) download and run on Windows; picks your stack and writes files into your project.
  • SDK Customizer generate online and download tailored SDK source for any supported language.
Installation options

Pick one path: download a ready-made SDK (or use the Windows installer), use an NPM package for JavaScript/React, or generate tailored code for other languages.

Installer (.exe)

Windows app — selects your stack, writes SDK files into your project. Download installer

SDK Customizer

Browser tool — generate & download SDK for JS, Python, PHP, Go, C++, and more. Open SDK Customizer

Option A: Download SDK or Installer

Installer: run sublyzer-installer.exe, enter your integration code, choose your language/framework. Files are copied into your project automatically.

SDK Customizer: open https://www.sublyzer.com/sdk-customizer, configure features, then Download the generated sublyzer.js (or language-specific files). Place them in your repo (e.g. public/sdks/ for web apps).

Option A (web): Script tag

Fastest for static sites — no build step:

<script
  src="https://www.sublyzer.com/sublyzer.js"
  data-integration-code="YOUR_INTEGRATION_CODE"
  defer
></script>

Option B: NPM Package

npm install @sublyzer/browser

Then initialize in your app:

import { Sublyzer } from '@sublyzer/browser';

Sublyzer.init({
  code: 'YOUR_INTEGRATION_CODE',
  // Optional: customize what data is collected
  performance: true,
  errors: true,
  sessions: true,
});

Option C: React / Next.js

npm install @sublyzer/react

In your _app.tsx or root layout:

import { SublyzerProvider } from '@sublyzer/react';

export default function App({ Component, pageProps }) {
  return (
    <SublyzerProvider code="YOUR_INTEGRATION_CODE">
      <Component {...pageProps} />
    </SublyzerProvider>
  );
}

Need a different language? Use the SDK Customizer to generate code for Python, PHP, Rust, Go, C++, and more. Full per-language docs: SDK Reference.

Self-hosted script (after download)

If you downloaded sublyzer.js from the Customizer or installer, place it under public/sdks/sublyzer.js (Next.js) or your static assets folder:

<script
  src="/sdks/sublyzer.js"
  data-integration-code="YOUR_24_CHAR_CODE"
  defer
></script>

Or load from production CDN: https://www.sublyzer.com/sublyzer.js

Verify data is flowing

After install:

  • Open your site and trigger a few page views
  • Check the integration dashboard — events appear within seconds
  • Use Sublyzer.flush() on page hide if you batch heavily
Best practices
  • Never put API secrets in browser SDKs — only the public integration code.
  • Avoid PII in custom events; use opaque user IDs with identify().
  • For server apps, prefer generated Node/Python/PHP SDKs from the Customizer or installer.

Need help? Join our Discord.