Introduction
Branch links are a powerful deep linking and attribution solution that enables marketers and developers to create seamless cross-platform experiences for mobile apps. These intelligent links work across devices, platforms, and channels to drive app installs, re-engagements, and conversions while providing robust attribution data. Branch links solve the fragmentation challenges in the mobile ecosystem by routing users to the right destination regardless of their device, operating system, or app installation status.
Core Concepts & Components
| Component | Description |
|---|---|
| Deep Link | A URL that takes users to specific in-app content rather than just opening the app |
| Universal Link | Apple’s implementation that opens apps directly from links without redirects (iOS) |
| App Link | Android’s implementation of direct app opening from links (Android) |
| Web-to-App | Technology to transition users from mobile web to in-app experiences |
| Deferred Deep Linking | Links that store destination information through app install process |
| Link Domain | Your Branch-provided or custom domain used for all Branch links |
| Attribution | Tracking which marketing channels drive app installs and engagement |
| Link Data | Custom parameters attached to links for personalization and tracking |
| Link Control Parameters | Special parameters that modify link behavior ($desktop_url, $ios_url, etc.) |
Link Types Comparison
| Link Type | Best For | Features | Setup Complexity |
|---|---|---|---|
| Quick Links | Marketing campaigns, sharing | Easy creation, customizable, tracking | Low |
| Web SDK Links | Web-to-app journeys | Dynamic creation on website, personalized | Medium |
| App Links (SDK) | In-app sharing, referrals | Created within app, user-specific | Medium |
| Journey Banners | Mobile web conversions | Smart banners with personalization | Medium |
| Email Links | Email campaigns | Open tracking, deep linking | Medium |
| Ad Links | Paid campaigns | Attribution, install tracking | Medium-High |
| QR Codes | Offline-to-online | Customizable, trackable | Low |
| SMS Links | Text campaigns | Short links, attribution | Low |
| Social Media Links | Social sharing | Platform-optimized, tracking | Low |
Step-by-Step Implementation Process
Account & SDK Setup
- Create Branch account at dashboard.branch.io
- Configure app settings (store URLs, URI schemes)
- Integrate Branch SDK in your applications
- Set up custom link domain (recommended)
iOS Configuration
- Configure Universal Links capabilities in Xcode
- Upload AASA file to your web domain
- Add entitlements and handle deep links in AppDelegate
- Test Universal Links functionality
Android Configuration
- Configure App Links in manifest
- Add Digital Asset Links JSON to website
- Handle incoming intents in Activity
- Test App Links functionality
Deep Linking Integration
- Define deep link routing structure
- Implement content routing in app
- Set up default link behavior
- Create test links for key user journeys
Attribution & Analytics Setup
- Configure attribution windows
- Set up conversion events
- Enable partner integrations
- Create dashboards for key metrics
Testing & Validation
- Test links across platforms and states
- Verify attribution tracking
- Validate conversion events
- Check data reporting accuracy
Link Creation Methods
Dashboard Creation
1. Navigate to Marketing > Quick Links in Branch Dashboard
2. Select link type and enter link name
3. Add deep link data (key-value pairs)
4. Configure redirection settings
5. Set analytics tags
6. Generate and copy link
Web SDK Integration
// Initialize Branch
branch.init('key_live_xxxx');
// Create deep link
branch.link({
tags: ['tag1', 'tag2'],
channel: 'facebook',
feature: 'sharing',
data: {
'$desktop_url': 'https://yourwebsite.com/fallback',
'custom_data': 'value',
'product_id': '1234'
}
}, function(err, link) {
// Use generated link
console.log(link);
});
iOS SDK Link Creation (Swift)
// Set up deep link properties
let linkProperties = BranchLinkProperties()
linkProperties.channel = "in-app"
linkProperties.feature = "sharing"
linkProperties.addControlParam("$desktop_url", withValue: "https://yourwebsite.com/fallback")
// Set up link content
let universalObject = BranchUniversalObject()
universalObject.title = "Product Name"
universalObject.contentDescription = "Product description"
universalObject.imageUrl = "https://yourwebsite.com/img/product.jpg"
universalObject.contentMetadata.customMetadata["product_id"] = "1234"
// Create link
universalObject.getShortUrl(with: linkProperties) { (url, error) in
if let url = url {
// Use generated link
print(url)
}
}
Android SDK Link Creation (Kotlin)
// Set up link content
val universalObject = BranchUniversalObject()
.setTitle("Product Name")
.setContentDescription("Product description")
.setContentImageUrl("https://yourwebsite.com/img/product.jpg")
.setContentMetadata(ContentMetadata().addCustomMetadata("product_id", "1234"))
// Set up link properties
val linkProperties = LinkProperties()
.setChannel("in-app")
.setFeature("sharing")
.addControlParameter("\$desktop_url", "https://yourwebsite.com/fallback")
// Create link
universalObject.generateShortUrl(this, linkProperties, Branch.BranchLinkCreateListener { url, error ->
if (error == null) {
// Use generated link
Log.i("BRANCH", "Got link: $url")
}
})
Common Link Parameters
Standard Parameters
| Parameter | Description | Example Value |
|---|---|---|
$desktop_url | Fallback URL for desktop | https://website.com/product |
$ios_url | Fallback for iOS without app | https://itunes.apple.com/app/id123 |
$android_url | Fallback for Android without app | https://play.google.com/store/apps/details?id=com.app |
$fallback_url | Default fallback for all platforms | https://website.com/download |
$canonical_url | SEO parameter for web content | https://website.com/product/1234 |
$og_title | Open Graph title for social sharing | Amazing Product |
$og_description | Open Graph description | Check out this awesome product |
$og_image_url | Open Graph image URL | https://website.com/img/product.jpg |
Routing Parameters
| Parameter | Description | Example Value |
|---|---|---|
$deeplink_path | In-app path to route to | product/1234 |
$android_deeplink_path | Android-specific path | product/1234 |
$ios_deeplink_path | iOS-specific path | product/1234 |
$match_duration | How long to match clicks to opens (seconds) | 7200 |
$always_deeplink | Force deeplink open attempt | true |
$web_only | Never try to open the app | true |
Analytics Parameters
| Parameter | Description | Example Value |
|---|---|---|
~channel | Distribution channel | facebook, email, sms |
~feature | Link feature | sharing, referral, campaign |
~campaign | Marketing campaign | summer_sale |
~tags | Array of tags | [“tag1”, “tag2”] |
~stage | Customer journey stage | new_user |
~keywords | Keywords for search | product, sale |
Deep Link Routing in Apps
iOS Handling (Swift)
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
return Branch.getInstance().application(app, open: url, options: options)
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestorableObject]?) -> Void) -> Bool {
return Branch.getInstance().continue(userActivity)
}
// In AppDelegate didFinishLaunchingWithOptions:
Branch.getInstance().initSession(launchOptions: launchOptions) { (params, error) in
if let params = params as? [String: AnyObject] {
// Handle deep link data
if let productId = params["product_id"] as? String {
// Navigate to product detail
self.navigateToProduct(productId: productId)
}
}
}
Android Handling (Kotlin)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Initialize Branch
Branch.getAutoInstance(this)
// Handle deep link data
Branch.sessionBuilder(this).withCallback { branchUniversalObject, linkProperties, error ->
if (error == null) {
// Process deep link data
val productId = branchUniversalObject.contentMetadata.customMetadata["product_id"] as? String
if (productId != null) {
// Navigate to product detail
navigateToProduct(productId)
}
}
}.withData(this.intent.data).init()
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
this.intent = intent
// Handle deep link from new intent
Branch.sessionBuilder(this).withCallback { branchUniversalObject, linkProperties, error ->
if (error == null) {
// Process deep link data
val productId = branchUniversalObject.contentMetadata.customMetadata["product_id"] as? String
if (productId != null) {
// Navigate to product detail
navigateToProduct(productId)
}
}
}.withData(intent.data).init()
}
Testing & Troubleshooting
Common Issues & Solutions
| Issue | Possible Cause | Solution |
|---|---|---|
| Universal Links not working on iOS | Incorrect AASA file | Verify AASA file is accessible at yourdomair/.well-known/apple-app-site-association |
| App Links not working on Android | Digital Asset Links issue | Check assetlinks.json is properly configured and accessible |
| Deferred deep linking fails | SDK integration issue | Verify Branch SDK initialization in app |
| Attribution data missing | Incorrect campaign parameters | Check channel, feature, campaign parameters are set correctly |
| Web fallback not working | Missing fallback URLs | Ensure $desktop_url or $fallback_url parameters are set |
| Link takes users to app store when app is installed | Platform detection issue | Check Universal/App Links configuration and test on latest OS versions |
| Data not passing to app | Deep link handling code issue | Debug data receiving in initSession callback |
| QR code links not working | QR code scanned by native camera | Use Branch QR codes and ensure proper app-opening metadata |
Testing Tools
- Branch Testing Console: Verify link routing behavior
- Branch Link Debugger: Examine link properties and behavior
- iOS Universal Link Validator: Test Universal Links setup
- Android App Links Verification: Check App Links configuration
- Charles Proxy: Monitor network requests for link resolution
- Developer Mode in Branch Dashboard: Detailed event logging
Attribution & Analytics Features
Key Metrics & Reports
- Install Attribution: Track which sources drive installs
- Re-Engagement: Measure returning user activity
- Conversion Funnel: Track user progression through key events
- Campaign Performance: Measure ROI across channels
- Cohort Analysis: Analyze user behavior over time
- Revenue Analytics: Track purchase events and value
- Influencer Marketing: Track referral effectiveness
- Cross-Platform Performance: Compare iOS vs Android metrics
Analytics Integrations
- Ad Platforms: Facebook, Google, TikTok, Snapchat, etc.
- Attribution Partners: AppsFlyer, Adjust, Kochava
- Marketing Platforms: HubSpot, Marketo, Braze
- Analytics Tools: Amplitude, Mixpanel, Firebase
- Data Warehouses: BigQuery, Snowflake, Redshift
Advanced Features & Use Cases
Web-to-App Journeys
- Smart Banners: Customizable top/bottom banners on mobile web
- Journeys: Fully customizable interstitials and banners
- Deepviews: Web preview of in-app content before install
- Text-Me-The-App: SMS app download links with deep linking
Email Campaigns
- Click Tracking: Track email opens and link clicks
- Personalized Deep Links: Create unique links per user
- A/B Testing: Compare performance of different deeplink strategies
- Email Service Provider Integrations: Work with major ESPs
Referral Programs
- User-Generated Links: Allow users to create referral links
- Reward Tracking: Attribute referrals to specific users
- Multi-Tier Programs: Track referral chains
- Fraud Prevention: Detect suspicious referral patterns
QR Codes
- Custom Design: Create branded QR codes
- Dynamic Linking: Update destination without changing QR code
- Offline Attribution: Track conversions from physical materials
- Contextual Experiences: Deliver location-specific content
Best Practices for Implementation
- Use Custom Domains: Implement a branded domain for all Branch links
- Consistent Parameter Naming: Establish conventions for custom data parameters
- Create Link Templates: Standardize link structures for different channels
- Test Across Platforms: Verify behavior on iOS, Android, web, and different OS versions
- Implement Event Tracking: Track key user actions beyond installs
- Use Journey Analytics: Understand user paths through your marketing funnel
- Leverage A/B Testing: Test different deep linking strategies
- Monitor Dashboard: Regularly review performance metrics
- Keep SDK Updated: Maintain latest SDK version for best performance
- Document Implementation: Create internal documentation for link structure and usage
Resources for Further Learning
Official Documentation
Support Channels
Learning Resources
Remember that mobile deep linking technology is constantly evolving. Stay updated with Branch’s latest recommendations, especially regarding iOS and Android platform changes that may affect deep linking behavior.
