What the SDK does (and doesnβt do)
The Gu1 SDK runs inside your app and captures what your backend cannot see: device signals, environment integrity, and the screen journey β including everything before login. The events you already send from your backend stay exactly as they are: they just carry an extrasessionId so the Gu1 engine can join both worlds.
The SDK is fail-open by design: it never blocks your app, never propagates errors (the only exception is invalid configuration at init), requires no permissions, and does not access user data.
| Size | ~150 KB |
| Required permissions | None |
| Requirements | React Native 0.71+, iOS 13+, Android 6+ (API 23) |
| Distribution | Private npm (scope @gu1 β request read access from Gu1) |
1. Install
AndroidManifest.xml or Info.plist are required.
2. Initialize (at your appβs entry point)
sessionId, collects device signals, and ships them in the background. Nothing else is required in the app for signal capture.
3. Screen tracking (recommended β 5 lines)
With React Navigation, the SDK captures navigation and screen timings automatically:4. The sessionId towards your backend (1 header)
To link your backend events to the device session, attach thesessionId as a header on the appβs calls to your own backend:
- First authenticated request: send Gu1 an event with the
sessionId+ the userβsentityExternalId. Gu1 retroactively binds the whole session, including everything before login. - Existing events: add the optional camelCase
sessionIdfield to the events you already send toPOST /events/userβ events without it keep working unchanged.
5. Transactions (1 line)
On the transactions you send to Gu1, thesessionId travels in metadata:
6. Verify
- Launch the app in sandbox β the session appears in your Gu1 dashboard with device signals.
- Navigate between screens β automatic
NAVIGATIONevents. - Log in β the session gets bound to the user (retroactive binding).
- Run a test transfer β the transaction shows session context in its evaluation.
Integration summary
| Step | Where | Effort |
|---|---|---|
| Install + init | App | ~15 min |
| Screen tracking | App | 5 lines |
X-Gu1-Session-Id header | App (HTTP client) | 1 line |
sessionId on events + binding | Backend (middleware) | ~1 hour |
sessionId on transactions | Backend | 1 line |