@braith/sdk
v0.1.0
Published
Explicit outcome-event tracking for Braith in browsers and Node.js
Readme
@braith/sdk
Explicitly send meaningful outcome events to Braith. The SDK does not collect clicks, DOM contents, requests, cookies or form values automatically.
import { Braith } from "@braith/sdk";
Braith.init({ projectKey: process.env.NEXT_PUBLIC_BRAITH_BROWSER_KEY!,
endpoint: "https://app.braith.dev/api/v1/events", release: "build-123" });
Braith.identify("user-123");
await Braith.track("premium_feature_attempted", { feature: "export" }, { attemptId: "attempt-123" });Use createServerClient with a private server key for authoritative server events. Pass user identity in each server track call. See the setup prompt in the Braith dashboard for your project's manifest and agent workflow.
