The churn radar for B2B SaaS·Book a call·Setup in 10 minutes·Trusted by CS teams·SOC 2 · GDPR · AES-256·
The churn radar for B2B SaaS·Book a call·Setup in 10 minutes·Trusted by CS teams·SOC 2 · GDPR · AES-256·

SDK installation guide

Install FirstDistro SDK in HTML, Next.js, or React. Token-based installation provides zero configuration and automatic initialization.

Last Updated: January 17, 2026 SDK Version: 2.0.0 (Static API)

Choose your installation method

MethodBest ForSetup Time
npm PackageReact, Next.js apps with bundlers~5 minutes
Script Tag (below)Static sites, no-build setups~2 minutes

Tip: Using React or Next.js? The npm package provides React hooks, TypeScript support, and better DX.


Script tag installation

FirstDistro SDK uses token-based installation for zero configuration and automatic initialization.

Get your installation token: Dashboard → Settings → SDK Configuration

Choose your framework

Quick Installation (Token-based)

Add this script tag before the closing </body> tag:

⚠️ Important: Replace fd_your-token-here with your actual installation token from the dashboard. Your token will look like: fd_hnrpps0i93yyfgdldhylhelieerup68s

Installation complete!

Next steps:

  1. The SDK is now loaded and ready to use
  2. Use FirstDistro.setup() to set user and account context
  3. See usage example below for complete code
Show usage example

Use setup() to set user and account context in one call. Account grouping is required for Customer Insights to work.

After adding the script tag, the SDK is automatically initialized. Use it anywhere in your HTML:

Verification

After installation, check the browser console for:

  • [FirstDistro] ✅ SDK initialized
  • [FirstDistro] ✅ Enabling event tracking (if tracking enabled)

Next step