/redirect

GET

Attribution 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:

  1. Mobana captures attribution data (UTM parameters, IP, device signals)
  2. Stores the click for later matching
  3. Redirects the user to the appropriate app store

Endpoint#

GET https://YOUR_APP_ID.mobana.ai/redirect

Or use your custom endpoint: https://yourapp.com/d/redirect

Query Parameters#

ParameterTypeDescription
utm_sourcestringTraffic source (e.g., facebook, google, tiktok). Highly recommended.
utm_mediumstringMarketing medium (e.g., cpc, social, email). Highly recommended.
utm_campaignstringCampaign name. Highly recommended.
utm_contentstringAd content identifier (e.g., ad variant name).
utm_termstringSearch keywords.
datastringURL-encoded JSON string of custom data to pass through. Available in the app via attribution.data.
urlstringOverride the redirect destination URL. If omitted, auto-detects platform and uses app store URLs from your Dashboard settings.

Examples#

Basic Usage

Campaign URL
https://YOUR_APP_ID.mobana.ai/redirect
  ?utm_source=facebook
  &utm_campaign=summer_launch
  &utm_medium=cpc

With Custom Data

Campaign URL
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_launch

See Custom Endpoints guide for setup instructions.

Tracking Template

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}