Skip to content
Documentation menu

Concepts

Links and routing

How a DL2App link decides where each visitor goes: app, store, hand-off page, landing page or preview. Rules, A/B splits, expiry and passthrough.

A link is an address (yourapp.dl2.app/summer) plus instructions for each kind of visitor. Every request is routed on its own, in this order.

What happens on a tap

  1. The phone may never ask us. If the app is installed and the tap came from somewhere that honours Universal Links (iOS) or App Links (Android), the operating system opens the app directly with the URL. The SDK then asks DL2App what the link means and hands your code a path and data.
  2. Otherwise the request reaches DL2App, which works out the device, the browser, and whether it is a browser inside another app.
  3. Link state is checked: disabled, flagged, expired, over its click limit, or password-protected.
  4. Targeting rules run top to bottom. The first rule that matches the visitor’s country, operating system or language sends them to that rule’s URL.
  5. The platform decision applies: see the table below.
  6. The click is recorded, classed as a person, a bot or a scanner.
VisitorDefaultYou can change it to
iPhone or iPad, normal browserApp Store, through a short page that also offers “open in app”A custom URL, the hand-off page, or the landing page
Android, normal browserThe app if installed, otherwise Google Play with the link carried in the install referrerA custom URL, the hand-off page, or the landing page
A browser inside another appA hand-off page with a button (see in-app browsers)Straight to the store
DesktopA landing page with a QR code of the same linkAny URL
Preview bots (chat apps, social networks, search)A page with your title, description and imageThe text and image, per link or per project

Defaults are set per project under Settings; any link can override them.

What your app receives

However the link arrives (opened directly, or matched after an install), the SDK gives your code the same shape:

{
  path: "/invite/42",              // the link's app path
  data: { inviter: "42" },         // the link's data
  params: { ref: "newsletter" },   // query parameters on the tapped URL
  source: "universal_link",        // or app_link, uri_scheme, deferred
  isFirstOpen: false
}

Put what the app needs in the path and the link data, not only in query parameters. Some in-app browsers strip query strings.

Passthrough

With passthrough on (the default), an address that matches no link is still routed: yourapp.dl2.app/product/9 opens the app at /product/9. That lets you turn every URL of your website pattern into a deep link without creating each one.

Per-link options

  • Targeting rules by country, operating system and language.
  • A/B variants: split web destinations by weight. A visitor keeps the same variant.
  • Expiry with a URL to send people to afterwards, and a click limit.
  • Password: visitors enter it once before being routed.
  • Sub-paths: let /summer/anything route like /summer, with the rest passed to the app.
  • Query forwarding: pass the tapped URL’s query parameters on to the destination.
  • Preview title, description and image, and campaign tags (UTM).
  • QR code: every link has one, and scans are counted separately from taps.

What counts as a click

Every routed request is stored with a class: human, bot (preview fetchers and crawlers) or scanner (security tools that open links in email). Dashboard totals count humans. A click is unique when it is the first from that visitor on that link in the hour; the visitor is recognised by a hash that changes daily, not by a cookie.

When a link does not redirect

  • Disabled by you, or archived.
  • Expired or over its click limit: visitors go to the expiry URL if you set one.
  • Flagged for abuse: visitors see a warning page. The owner sees the reason in the dashboard and can appeal. See acceptable use.

A team that stops paying does not stop redirecting. See the permanence promise.

Links and routing · Docs · DL2App