Browser
Add website analytics with one script.
Add the public /v1.js browser client with your website project ID. Browser requests authenticate through the page's Origin, or its Referer as a fallback, so every production domain must be listed in project settings.
- Tracks page views, custom events, goals, and opaque account identities
- Uses cookie-free, project-scoped visitor and session identifiers
- Respects browser Do Not Track by default
- Queues events through
POST /v1/events or POST /v1/batch
React Native and Expo
Use the JavaScript package with your storage adapter.
The @statsviewer/react-native package works with React Native and Expo without a custom native module. Configure separate iOS and Android project IDs and client keys, then provide AsyncStorage or another compatible persistent store.
- Explicit screen, event, goal, and identify methods
- Consent-gated installation and session identity
- Persistent batches with bounded retries
Unity
Add the source package through Unity Package Manager.
The public StatsViewer Unity package supports iOS and Android players. Add it from its Git URL through Unity Package Manager. It selects the credential for the compiled platform, persists a bounded offline queue, and sends events from a background runner.
- Screen, event, goal, identify, consent, and flush methods
- Application-scoped random installation IDs
- No advertising, hardware, vendor, or Unity device identifiers
Native starters
Download dependency-free Swift and Kotlin clients.
Use the native starters when you do not need a cross-platform package:
Public event API
Send one envelope or a batch of up to 100 events.
Trusted servers authenticate with Authorization: Bearer your_server_api_key_here. Keep the key secret and use the project that issued it.
POST /v1/events
- Accepts one event envelope.
POST /v1/batch
- Accepts an object containing 1 to 100 events for one project.
202 Accepted means event capacity was reserved and new events were queued for asynchronous storage. Validation and monthly-limit failures reject a complete batch; the API does not return partial success.
Retry network failures, 429, and 5xx responses with bounded exponential backoff. Do not retry 402 until capacity resets or the plan changes. Keep the same event_id across retries.
Privacy contract
Use product-scoped identity and exclude sensitive data.
Generate random installation and session identifiers scoped to the StatsViewer project. Use an opaque product account ID only when you need to associate activity with a signed-in account.
- Do not send names, email addresses, phone numbers, payment details, passwords, or access tokens
- Do not read or send advertising, hardware, operating-system, or vendor identifiers
- Collect no application identity or events before consent when consent is required
Check the human-readable status page or machine-readable status endpoint when collection is unavailable.