# Overview (/docs/sdk)





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.

<Callout type="info">
  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](/docs/api). If you can't ship a client SDK at all, you can
  forward events server-side with [`POST /v1/events`](/docs/api/reference/events/forward).
</Callout>

## Supported platforms [#supported-platforms]

| Platform         | Package                                               |
| ---------------- | ----------------------------------------------------- |
| Expo             | `@layers/expo`                                        |
| React Native     | `@layers/react-native`                                |
| iOS (Swift)      | `layers-sdk-ios` (Swift Package)                      |
| Android (Kotlin) | `com.layers.sdk:layers-android`                       |
| Flutter          | `layers_flutter`                                      |
| Unity (C#)       | `com.layers.analytics` (UPM package, iOS and Android) |
| Web              | `@layers/client`                                      |
| Node.js          | `@layers/node`                                        |

## Get your App ID [#get-your-app-id]

Every install is initialized with an **App ID** — a stable identifier for one app in one project.

Ask for one in the Layers app: open **Connections**, choose **Layers SDK**, and press **Get your App ID**. The panel then hands you the value, along with a ready-to-paste prompt for your coding agent. The same App ID is returned by [`GET /v1/projects/:projectId/sdk-apps/:appId`](/docs/api/reference/sdk-apps/get-sdk-app).

In the snippets throughout this section, replace `YOUR_APP_ID` with that value.

<Callout type="info">
  Your App ID is stable and there is only ever one per project — events and
  attributed clicks are keyed on it, so re-requesting returns the same value
  rather than minting a second one. If you decide against the SDK, **Turn off
  the Events SDK** in the same panel stops Layers counting it as a source. A
  build you have already shipped keeps reporting until you remove the SDK from
  it.
</Callout>

## Next steps [#next-steps]

<Cards>
  <Card icon="<Rocket className=&#x22;text-fd-primary&#x22; />" title="Installation" href="/docs/sdk/installation" description="Per-platform setup — install the package, initialize with your App ID, send your first event." />

  <Card icon="<Bot className=&#x22;text-fd-primary&#x22; />" title="Prompt your coding agent" href="/docs/sdk/agent-prompt" description="A ready-to-paste prompt that has Claude, Cursor, or any agent instrument your app." />

  <Card icon="<Radio className=&#x22;text-fd-primary&#x22; />" title="Tracking events" href="/docs/sdk/tracking-events" description="The events worth tracking, their properties, identifying users, and how batching works." />

  <Card icon="<Fingerprint className=&#x22;text-fd-primary&#x22; />" title="Attribution" href="/docs/sdk/attribution" description="How installs are attributed, plus iOS clipboard attribution and App Tracking Transparency." />
</Cards>

## Verify it's working [#verify-its-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](/docs/api/concepts/sdk-health).

## Automated install [#automated-install]

If your project is connected to a GitHub repository, Layers can open the pull request that wires the SDK into your codebase for you. The manual steps in this section are what that pull request does.

You start it. On the **Layers SDK** row in your workspace, once GitHub is connected and a repository is attached, the button opens the pull request. Nothing runs on a schedule and nothing runs without the click.

What it needs before that button appears:

* a repository attached to the project;
* the Layers GitHub App installed on that repository's owner, with the repository granted to it (a read-only connection is not enough — the pull request is pushed with the App's own token);
* an App ID issued for the project, which is what the generated initialization code uses.

What it does: clones your repository into a sandbox, detects the framework (Flutter, Expo, bare React Native, Swift, Kotlin or Unity), makes the smallest edits that install and initialize the SDK, pushes a new branch and opens a **draft** pull request against your default branch. Your default branch is never written to and nothing is merged for you — you review it like any other pull request.

If it cannot find an app it knows how to instrument, it changes nothing and opens nothing, and the row says so. Install by hand from the steps above.
