Installation
Add @bodytracker/sdk to your project using your package manager of choice, or load it directly from a CDN.
Package managers
The core SDK ships as a single package with no runtime dependencies. Install it with npm, yarn, pnpm, or bun — or import it straight from a CDN with no build step at all.
npm install @bodytracker/sdkReact bindings
Building with React? Install @bodytracker/react alongside the core SDK for hooks and components that manage the tracker lifecycle for you.
npm install @bodytracker/reactRequirements
Node.js 18+ for your build tooling, and a modern browser (the latest two versions of Chrome, Edge, Safari, or Firefox) with camera access for tracking at runtime. See Getting Started for the full list.
Verify your installation
Once installed, import the SDK and log its version to confirm everything resolved correctly:
import { BodyTracker, VERSION } from "@bodytracker/sdk"; console.log(`@bodytracker/sdk v${VERSION}`); const tracker = new BodyTracker({ apiKey: "bt_test_3Lw8p...redacted" });console.log(tracker.getStatus()); // "idle"Version history
| Version | Status | Highlights |
|---|---|---|
| 3.4.0 | Current | Adds pauseSession/resumeSession and the qualityChanged event. |
| 3.3.0 | Prior | Introduces exportSession with JSON, CSV, and PDF output. |
| 3.2.0 | Prior | Adds configurable smoothing and locale support. |
| 3.0.0 | Prior | Rewrites the event system around on()/off() with unsubscribe functions. |
See the full Changelog for every release, including patch versions and migration notes.