Back to Documentation
installation
SDK installation guide
Install FirstDistro SDK in HTML, Next.js, or React. Token-based installation provides zero configuration and automatic initialization.
Last Updated: January 25, 2025
SDK Version: 2.0.0 (Static API)
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 a single script tag to your HTML:
⚠️ Important: Replace fd_your-token-here with your actual installation token from the dashboard. Your token will look like: fd_hnrpps0i93yyfgdldhylhelieerup68s
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My App</title>
</head>
<body>
<h1>Welcome to My App</h1>
<!-- FirstDistro SDK - Token-based installation -->
<script src="https://firstdistro.com/sdk/install/fd_your-token-here.js"></script>
<script>
// SDK is automatically initialized!
// You can start using it immediately:
// Identify user (if logged in)
FirstDistro.identify('user-123', {
name: 'John Doe',
email: 'john@example.com'
});
// Group by account (required for Customer Insights)
FirstDistro.group('acct_456', {
name: 'Acme Corp',
plan: 'professional'
});
// Track events
FirstDistro.track('page_viewed', {
page: window.location.pathname
});
</script>
</body>
</html>Get your token:Dashboard → Settings → SDK Configuration
Verification
After installation, check the browser console for:
[FirstDistro] ✅ SDK initialized[FirstDistro] ✅ Enabling event tracking(if tracking enabled)
Next steps
- Getting Started - Set up Customer Insights
- Event Tracking Guide - Track product usage events
- API Reference - Full SDK API documentation