Browse docs

Explore by section, then jump directly into a page.

SDKs Overview

Choose the right FlashAnalytics SDK for web, backend, and native mobile apps.

FlashAnalytics ships browser, server, and native SDKs with a shared event model and shared core APIs.

SDK packages

  • @flash-analytics/web - browser apps and SPAs
  • @flash-analytics/nextjs - App Router and Pages Router apps
  • @flash-analytics/astro - Astro layouts and client tracking
  • @flash-analytics/sdk - custom JavaScript and Node integrations
  • @flash-analytics/express - Express request and error middleware
  • @flash-analytics/react-native - React Native for iOS and Android
  • app.flashanalytics:flashanalytics-kotlin - native Android
  • FlashAnalytics SwiftPM package - native iOS

Current versions

  • @flash-analytics/web - 2.1.9
  • @flash-analytics/sdk - 2.1.8
  • @flash-analytics/nextjs - 2.1.10
  • @flash-analytics/astro - 2.1.8
  • @flash-analytics/express - 2.1.5
  • @flash-analytics/react-native - 2.1.9
  • app.flashanalytics:flashanalytics-kotlin - 1.0.9
  • FlashAnalytics SwiftPM package - 1.0.9

What is new across SDKs

  • getSession() with estimated expiry metadata
  • captureVariants, assignExperiment(), and autoAssignExperiments()
  • Remote config in the shared JavaScript SDK and browser-based wrappers
  • captureErrors for cross-platform JavaScript error tracking
  • Native crash capture for Kotlin, Swift, and React Native
  • Push notification lifecycle tracking with native host-app wiring

Shared APIs

analytics.track('signup_completed', { plan: 'pro' });
analytics.identify({ profileId: 'user-123', email: 'user@example.com' });
analytics.setGlobalProperties({ plan: 'pro' });

const session = analytics.getSession();
const assignments = await analytics.autoAssignExperiments();
const variant = await analytics.assignExperiment('checkout-cta');

Event support summary

  • Page and screen views: Web, Next.js, Astro, Kotlin, Swift, React Native
  • App lifecycle: Kotlin, Swift, React Native
  • Deep links: Kotlin, Swift, React Native
  • JavaScript errors: Web, Next.js, Astro, React Native
  • Native crashes: Kotlin, Swift, React Native
  • Request and server errors: Express
  • Push lifecycle: Kotlin, Swift, React Native with native host wiring

Quick start

import { FlashAnalytics } from '@flash-analytics/web';

const analytics = new FlashAnalytics({
  appId: 'YOUR_APP_ID',
  endpoint: 'https://api.flashanalytics.app',
  capturePageViews: true,
  captureErrors: true,
  captureVariants: true,
});

Platform guides