/redirect
GETAttribution redirect endpoint for campaign links. Captures attribution data and redirects to app stores.
Overview#
Use this URL in your ad campaigns. When a user clicks:
- Mobana captures attribution data (UTM parameters, IP, device signals)
- Stores the click for later matching
- Redirects the user to the appropriate app store
Endpoint#
GET https://YOUR_APP_ID.mobana.ai/redirectOr use your custom endpoint: https://yourapp.com/d/redirect
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 string of custom data to pass through. Available in the app via attribution.data. |
url | string | Override the redirect destination URL. If omitted, auto-detects platform and uses app store URLs from your Dashboard settings. |
Examples#
Basic Usage
https://YOUR_APP_ID.mobana.ai/redirect
?utm_source=facebook
&utm_campaign=summer_launch
&utm_medium=cpcWith Custom Data
https://YOUR_APP_ID.mobana.ai/redirect
?url=https://apps.apple.com/app/id123456789
&utm_source=facebook
&utm_campaign=summer_launch
&utm_medium=cpc
&utm_content=carousel_ad_1
&utm_term=mobile+app
&data={"promo":"WELCOME10","referrer":"friend123"}The data parameter is available in your app as attribution.data:
const attribution = await Mobana.getAttribution();
if (attribution?.data?.promo) {
applyPromoCode(attribution.data.promo); // "WELCOME10"
}Behavior#
Platform Detection
The redirect endpoint automatically detects the user's platform from their User-Agent and redirects to the appropriate store:
- • iOS → Apple App Store
- • Android → Google Play Store
- • Desktop → Your configured fallback URL (or App Store by default)
Android Install Referrer
For Android users, the redirect URL includes a click ID in the Play Store referrer parameter. This enables deterministic (100% accurate) attribution.
Click Deduplication
Multiple clicks from the same user within a short window are deduplicated to prevent duplicate attributions.
Using Custom Endpoints#
For cleaner URLs, use your own domain:
# Using your custom endpoint
https://yourapp.com/d/redirect
?utm_source=facebook
&utm_campaign=summer_launchSee Custom Endpoints guide for setup instructions.
Most ad platforms support tracking templates. You can use dynamic parameters:
# Facebook Ads
https://yourapp.com/d/redirect?utm_source=facebook&utm_campaign={{campaign.name}}&utm_content={{ad.name}}
# Google Ads
https://yourapp.com/d/redirect?utm_source=google&utm_campaign={campaignid}&utm_term={keyword}