Sdk
SDK Overview
Understand which Streakfox SDK to choose and what each integration unlocks.
The Streakfox platform ships a small set of focused SDKs. Choose the one that matches your stack, then follow the environment-specific guidance below.
Available SDKs
- Web SDK — The core client for recording events, fetching state, and handling identity in any JavaScript environment.
- React SDK — Provider + hooks plus ready-made components for displaying streak data in React apps.
Each SDK page covers installation, environment configuration, and the core helpers you can call. Use the comparison table below to understand the tradeoffs.
| SDK | Package | Highlights |
|---|---|---|
| Web | @streakdev/web | Record events, fetch state, alias users, and generate stable identities. |
| React | @streakdev/react | StreakProvider, useStreak, and UI components like counters and calendars. |
Framework-specific guidance
- Next.js — Use the React SDK in client components and the Web SDK in server actions or API routes when you need secure tokens. See Next.js Toolkit.
- WordPress — Embed the widget script and trigger events from shortcodes or theme scripts. See WordPress Plugin.
- Shopify — Add the widget script in theme files and send purchase events from webhooks. See Shopify App.