# Introduction to Deferred Linking

A standard deep link opens in-app content only when the app is already installed.
A deferred deep link also works when the app is not installed. Detour records the
click, redirects the user to the App Store or Google Play, and delivers the
original destination when the app opens for the first time. Navigation context
and campaign data are preserved through the store install.

You configure and monitor it all from the [Detour dashboard](https://godetour.dev/auth/signup).

## The deferred flow

1. A user clicks a Detour link, for example `https://your-org.godetour.link/<app_hash>/campaign-x`.
2. Detour saves the click and details about the device, such as screen size and
   system version.
3. Detour redirects the user to the App Store or Google Play. On Android, the
   Google Play link also contains a click ID.
4. The user installs the app and opens it for the first time.
5. The SDK sends the same device details to Detour, plus the click ID on Android.
6. Detour matches the install to the saved click and returns the link's destination.
7. Your app opens the screen for that destination.

---

## Benefits

- Marketing context is preserved through the store install, so users see the promotion or content you intended.
- Installs from link-based campaigns are attributed.
- Onboarding can pre-fill flows or show contextual content on first open.

---

## Matching modes

Detour matches an install to a click in one of two ways.

### Deterministic matching

Deterministic matching uses an explicit identifier created at click time,
carried through the store and read on first open. On Android that identifier is
`click_id` from the Play Install Referrer. It is exact, and Detour prefers it
whenever it is available.

### Probabilistic matching

Probabilistic matching is the fallback. Detour collects signals at click time
and again on first open, then scores how similar the two are. Signals include:

- user agent
- screen size
- system version
- locale and timezone
- IP address
- clipboard contents, on iOS only, and only when the user allows the paste

Detour picks the click with the highest score. It returns that click's link only
if the score is above a strict minimum.

---

## Limitations

- **Timing** — probabilistic matching only considers clicks inside a configured time window.
- **Cross-device** — a click on device A never matches an install on device B.
- **Platform constraints** — iOS has no install-referrer equivalent. Clipboard heuristics help, but they need the user's paste permission and are not guaranteed.
- **Accuracy** — probabilistic matching is best-effort. Do not route sensitive data through deferred links.

---

## Related pages

[Getting Started with Detour](https://detour.swmansion.com/docs/platform/fundamentals/getting-started/)
  [Click Handling & Redirect Flow](https://detour.swmansion.com/docs/platform/architecture/click-handling/)
  [Matching](https://detour.swmansion.com/docs/platform/architecture/matching/)
  [Limitations & Known Issues](https://detour.swmansion.com/docs/platform/architecture/architecture-limitations/)