# Migrate from Branch (/docs/sdk/migration-branch)



Branch is primarily a **deep-link / deferred-link** solution. Layers is
primarily an **attribution / ad relay** solution. They overlap on event
tracking, but Branch's deep-link infrastructure has no Layers
equivalent in the publicly available APIs today.

## Recommended pattern: run both [#recommended-pattern-run-both]

* Keep Branch for deep links, deferred deep links, SMS / email link
  generation.
* Add Layers for SDK event ingestion + CAPI / Events API forwarding +
  organic / paid management.

The two SDKs don't conflict.

## Deep-link attribution in Layers [#deep-link-attribution-in-layers]

`@layers/react-native` exposes a `Layers.deepLinks.*` surface (alpha)
that parses universal links / app links and correlates them with
`sdk_clicks` rows created on the `in.layers.com/c/:appId` click-relay
endpoint. This covers the core "click → install → attribution" flow
but does NOT replicate Branch's deferred-link, dynamic-link-generation,
or dashboard tooling.

If deep-link generation + routing is your primary use of Branch, don't
drop it.

## Event-only migration [#event-only-migration]

If you only use Branch to track events (no deep links), a full
migration is feasible:

* Map Branch standard events to Layers events:
  * `BRANCH_STANDARD_EVENT.PURCHASE` → `purchase_success`
  * `BRANCH_STANDARD_EVENT.ADD_TO_CART` → `add_to_cart`
  * etc.
* [Dual-send](/docs/sdk/migration-appsflyer#dual-send-sketch) for \~14
  days.
* Reconcile.
* Remove Branch.

## Custom event mapping [#custom-event-mapping]

Branch custom events → Layers custom events (same name). Add an
`event_map` entry on the relay if you need them forwarded to
Meta / TikTok.
