/link
GETCanonical Mobana link endpoint. One URL for both attribution and engagement — the OS opens your app directly when installed, with a clean web fallback otherwise.
Overview#
/link is the canonical Mobana link path. Use it everywhere — ad campaigns, influencer drops, push notifications, email, share sheets, referral links. The same URL behaves differently depending on whether the app is installed:
- App not installed — the OS opens the URL in the browser. Mobana runs the two-phase web flow: collects device signals, writes a Click row, then redirects to the App Store / Play Store. On first launch the SDK calls
/findto match the install to that Click — attribution lands ingetAttribution()and any deeplink payload fires throughonDeepLink('deferred'). - App installed — iOS / Android intercept the URL via Universal Links / App Links and hand it directly to your app.
onDeepLink('universal_link')fires within ~50 ms of the tap, before any network round-trip.
Customers don't pick a path per link — there's only one. Your app's onDeepLink handler decides what to do with each payload (e.g. apply an unlock code when data.unlock is set, otherwise ignore the event as a vanilla campaign click).
See the Deeplinks & Universal Links guide for the full lifecycle, plus the platform setup (Team ID, SHA-256 fingerprints, intent filters).
Endpoint#
GET https://YOUR_APP_ID.mobana.ai/linkOr use your custom endpoint: https://yourdomain.com/d/link
Query Parameters#
| Parameter | Type | Description |
|---|---|---|
utm_source | string | Traffic source (e.g., facebook, google, tiktok). Highly recommended. |
utm_medium | string | Marketing medium (e.g., cpc, social, email). Highly recommended. |
utm_campaign | string | Campaign name. Highly recommended. |
utm_content | string | Ad content identifier (e.g. ad variant name). |
utm_term | string | Search keywords. |
data | string | URL-encoded JSON object for structured custom payloads (unlock codes, referral IDs, in-app routing). Delivered as a typed object on event.data in onDeepLink and on attribution.data in getAttribution(). For simple flat values, skip data and pass plain query params — they come back via click_params. |
url | string | Override the store redirect destination. If omitted, the endpoint auto-detects platform and uses the App Store / Play Store URLs configured for your app. |
Every other query parameter (e.g. fbclid, ttclid, gclid, partner IDs) is captured automatically and surfaced as click_params — no configuration needed.
Examples#
Vanilla campaign link
https://YOUR_APP_ID.mobana.ai/link
?utm_source=facebook
&utm_campaign=summer_launch
&utm_medium=cpcA plain UTM-tagged link. No data payload — the OS still opens your app directly when installed, onDeepLink fires with empty data and the UTM fields populated, and your handler can ignore the event entirely.
Smart link with payload
https://YOUR_APP_ID.mobana.ai/link
?utm_source=tiktok
&utm_campaign=influencer_drop
&data={"unlock":"PROMO50","ref":"sara"}Use data for anything you want your app to act on:
interface Unlock { unlock?: string; ref?: string }
Mobana.onDeepLink<Unlock>(({ data, source }) => {
if (data?.unlock) applyUnlock(data.unlock); // "PROMO50"
if (data?.ref) trackReferrer(data.ref);
// No data fields set? It's a vanilla campaign tap — nothing to do.
});Universal Link / App Link setup#
For the OS to open your app directly (instead of falling through to the web flow), three pieces have to line up:
- App-side claim. iOS: add
applinks:YOUR_APP_ID.mobana.aito theAssociated Domainsentitlement. Android: add an intent-filter withandroid:pathPrefix="/link"andandroid:autoVerify="true". - Server-side proof. Set your iOS Team ID and Android SHA-256 fingerprints in App Settings → Deeplinks. Mobana serves the resulting
/.well-known/apple-app-site-associationand/.well-known/assetlinks.jsonat the host root, and the OS verifies them on app install / verifier run. - SDK wiring.
Mobana.init()attaches the URL and AppState listeners that fireonDeepLinkand notify the server about the delivered link.
Sample Android intent-filter (the iOS side is configured in Xcode):
<!-- AndroidManifest.xml -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="YOUR_APP_ID.mobana.ai"
android:pathPrefix="/link" />
</intent-filter>Run through the Test Setup checklist to confirm AASA / assetlinks are reachable and that onDeepLink actually fires on a fresh install.
Custom endpoints#
To serve Mobana links from your own domain, your reverse proxy must forward two things:
/link,/link/record,/link/probe(plus the existing/find,/conversion,/flows,/ping) under your chosen path prefix./.well-known/apple-app-site-associationand/.well-known/assetlinks.jsonat the host root, NOT under the path prefix — the OS only looks at the root.
# Using your custom endpoint
https://yourdomain.com/d/link?utm_source=email&utm_campaign=welcomeThe nginx / Apache templates in App Settings → Custom Endpoint already include all of the above. See the Custom Endpoints guide for details.