SDKs
Pick your platform and get up and running in minutes. Every SDK shares the same event model and core APIs.
Pick your platform
@flash-analytics/webBrowser apps, SPAs, and script-tag installs.
@flash-analytics/nextjsApp Router and Pages Router with React hooks.
@flash-analytics/astroAstro layouts and islands with client-side helpers.
@flash-analytics/sdkServer-side jobs, workers, CLIs, and custom backends.
@flash-analytics/expressAutomatic request and error tracking middleware.
@flash-analytics/react-nativeiOS and Android apps with lifecycle, session warm-up, and push tracking.
app.flashanalytics:flashanalytics-kotlinNative Android with session warm-up, deep links, screens, and crash capture.
FlashAnalytics (SwiftPM)Native iOS with SwiftUI, UIKit, deep links, and push.
Quick start (Web)
Three lines to start tracking. Replace YOUR_APP_ID with the UUID from your Flash dashboard.
npm install @flash-analytics/web@2.2.3import { FlashAnalytics } from '@flash-analytics/web';
const analytics = new FlashAnalytics({
appId: 'YOUR_APP_ID',
capturePageViews: true,
captureErrors: true,
});analytics.identify({ profileId: 'user_123', email: 'user@example.com' });
analytics.track('signup_completed', { plan: 'pro' });Shared APIs across all SDKs
Every SDK — browser, mobile, and server — exposes the same core methods.
track()Send a named event with optional propertiesidentify()Attach a stable user ID and profile datasetGlobalProperties()Merge properties into every subsequent eventrevenue()Record a purchase or subscription chargeincrement() / decrement()Adjust a numeric user propertygetSession()Read current session ID and estimated expiryonSessionUpdatedCallback option for restored, created, or refreshed sessionsdeliveryStrategyEnable batching with size, timeout, and fallback controlsfetchRemoteConfig()Pull feature flags and config valuesassignExperiment()Get or create an A/B test assignmentCurrent versions
| Package | Version | Platform |
|---|---|---|
@flash-analytics/web | v2.2.3 | Browser |
@flash-analytics/nextjs | v2.2.3 | React |
@flash-analytics/astro | v2.2.3 | Browser |
@flash-analytics/sdk | v2.2.3 | Server |
@flash-analytics/express | v2.1.8 | Server |
@flash-analytics/react-native | v2.1.19 | Mobile |
app.flashanalytics:flashanalytics-kotlin | v1.1.4 | Mobile |
FlashAnalytics (SwiftPM) | v1.1.1 | Mobile |