Overview
The Layers SDK instruments your app for attribution and event tracking — install it once per platform, then track the events that matter. Available for Expo, React Native, iOS, Android, Flutter, Web, and Node.
The Layers SDK instruments your app so Layers can attribute installs to the campaigns that drove them and measure what users do afterward. You install it once per platform, initialize it with your App ID, and call track() for the events you care about — the SDK handles sessions, batching, and attribution for you.
This is the client SDK — the code you ship inside your app. If you're
building against Layers from a backend and want HTTP endpoints instead, see the
API integration. If you can't ship a client SDK at all, you can
forward events server-side with POST /v1/events.
Supported platforms
| Platform | Package |
|---|---|
| Expo | @layers/expo |
| React Native | @layers/react-native |
| iOS (Swift) | layers-sdk-ios (Swift Package) |
| Android (Kotlin) | io.layers.sdk:layers-android |
| Flutter | layers_flutter |
| Web | @layers/client |
| Node.js | @layers/node |
Get your App ID
Every install is initialized with an App ID — a stable identifier for one app in one project. Find it in the Layers app: open your project's Events screen, click the gear icon, and copy the value under App ID. The same App ID is returned by GET /v1/projects/:projectId/sdk-apps/:appId.
In the snippets throughout this section, replace YOUR_APP_ID with that value.
Next steps
Installation
Per-platform setup — install the package, initialize with your App ID, send your first event.
Prompt your coding agent
A ready-to-paste prompt that has Claude, Cursor, or any agent instrument your app.
Tracking events
The events worth tracking, their properties, identifying users, and how batching works.
Attribution
How installs are attributed, plus iOS clipboard attribution and App Tracking Transparency.
Verify it's working
Once the SDK is initialized and sending data, confirm the signal on the same Events screen in the app — you'll see events stream in and a live status indicator. For a programmatic check (including an active synthetic probe), see SDK health & verification.
Automated install
If your project is connected to a GitHub repository, Layers can open a pull request that wires the SDK into your codebase for you. Trigger it from the Installation panel of the Events gear in the app — the manual steps in this section are what that PR automates.