Overview
You can use Deep Links on your Journeys, Ads links, Quick Links, and Email. In this guide, we will walk you through how to configure your default and custom link behavior, as well as how to create short and long links.
Default Link Behavior
If Your App Is Not Installed
User
clicks
on a Branch deep linkDevice
navigates
to the fallback (e.g. an app store or website)App Stores Supported:
Apple App Store
Google Play
Huawei App Store
Vivo App Store
Oppo App Store
Baidu Mobile Assistant
User
installs
andopens
your appBranch passes deep link
data
into your app
If Your App Is Installed
User
clicks
on a Branch deep linkDevice
opens
your app or navigates to expected link behaviorBranch passes deep link
data
into your app
Expected Link Behavior
Mobile
Expected link behavior is dependent on whether or not the app supports deep linking
*Able to force app open
using$uri_redirect_mode
or enabling a Deepview
Platform | iOS | Android |
---|---|---|
Facebook Newsfeed | Fallback; able to deep link via Facebook App Links | App |
Facebook Browser | App | Fallback; able to force app open when app install is detected, may throw error when app is uninstalled after initial detection |
Facebook Messenger | Fallback; able to deep link via Facebook App Links | App |
Facebook Messenger Browser | App | Fallback; able to force app open when app install is detected, may throw error when app is uninstalled after initial detection |
Instagram Profile | Fallback; able to force app open using | App |
Instagram Browser | App | App |
Instagram Stories | Fallback; able to force app open | App |
Twitter Feed | Fallback; able to force app open. Links with | App |
Twitter Browser | App | App |
Snap Messages | App | App |
Snap Stories | Fallback; review custom instructions for using Branch in Snap stories | App |
Fallback; need to use | Fallback | |
Fallback | Fallback | |
Pinterest Browser | App | App |
Google+ | Fallback; App Store redirects will not work | Fallback |
Chrome Browser | App | App |
Chrome Address Bar | Fallback | Fallback; deep link data will not pass into the app |
Safari Browser | App | N/A |
Safari Address Bar | Fallback; Blocked by Apple | N/A |
Firefox Browser | Fallback | App |
Firefox Address Bar | Fallback | App |
UC Browser | N/A | App |
Naver Browser | N/A | App |
Kakao Browser | N/A | App |
Opera Browser | App | App |
Ghostery Browser | App | Fallback; query strings must be encoded ($ = %24) |
Google Hangouts | Fallback; able to force app open | App |
Samsung SMS | N/A | App |
Samsung SMS Browser | N/A | App |
Apple iMessage | App | N/A |
Apple Business Chat | App | N/A |
Slack | App; must configure Slack to open links with Safari | App |
Fallback; customize WeChat fallback urls | Fallback; customize WeChat fallback urls | |
App; | App; | |
LINE | Fallback; able to force app open | App |
Discord | App | App |
Apple Mail | App | N/A |
Gmail | App | App |
Yahoo Mail | Fallback; able to force app open | App |
TikTok | Ads promoting apps will take users to the app store | Ads promoting apps will take users to the app store |
TikTok | Ads taking users to a non app-store landing page will open in an in-app browser. | Ads taking users to a non app-store landing page will open in an in-app browser. |
Desktop
Expected link behavior is dependent on whether or not the app supports deep linking
By default, we attempt to launch the apps via URI schemes and load the desktop redirect fallback in the background
*Only launches background desktop web fallbacks
using$afterclick_desktop_url
Platform | Mac | Windows |
---|---|---|
Safari | App; Supports Universal Linking | App |
Firefox | App* | App* |
Chrome | App* | App* |
Edge | App | App |
Internet Explorer | N/A | App* |
Slack | App; Supports Universal Linking | App |
Custom Link Behavior
Pass Data From Link to App
Add link data to each deep link
Add key-values pairs to your Quick Links
Append query strings
https://example.app.link/fzmLEhobLD?$custom_data=123&hello=world
Fallback to a Specific URL
Determine where a deep link will navigate to if either
Your app is not installed
[or] Another app prevent links from deep linking outside their app
Fallback overrides (ordered by precedence)
Add query string
https://example.app.link?$ios_url=https://example.com
Add link data
$ios_url = 'https://example.com'
(docs)Add link data for a deep view
$ios_deepview = 'deepviewId'
(docs)Enable a Deep View globally on the Branch Dashboard
Add link data
$fallback_url = 'https://example.com'
(docs)Add
iOS/Android Custom URL
on the Branch DashboardAdd Default URL (
$fallback_url
) on the Branch Dashboard
Open Web Instead of App
Your app is not installed
Device
navigates
to the fallback (e.g. an app store or website)
Your app is installed
iOS: need to override
Universal Links
Android: need to override
App Links
Uncheck
Enable App Links
and then hitSave
on the Branch DashboardAdd redirect
$android_url = 'https://google.com'
(docs)Add a broken URI Scheme with
$android_deeplink_path = 'random'
Add
-web
in the link domain: e.g.branch.app.link
->branch-web.app.link
Does not work with custom link domains when used in conjunction with a custom alias.
Social Link Behavior
Use OG Tags to display content as a preview card in Facebook, Twitter, Pinterest, iMessage, etc.
The
$og_title
and$og_description
tags are included with the Branch Growth Platform.The
$og_image_url
tag is reserved for paid Branch accounts with a dedicated contract.
Use Deepviews to display content as a website
Increases install attribution
Completes deep linking experience in certain apps
UTM Behavior
Enabled by Default
To disable this functionality, go to Link Settings -> Advance Settings -> Analytics mapping with UTM.
When redirecting to a web URL, Branch automatically passes through any values from the following Branch link analytics tags as UTM parameters:
~campaign
->utm_campaign
~channel
->utm_source
~feature
->utm_medium
This applies to web URLs defined using any of the following
$fallback_url
,$ios_url
,$android_url
,$desktop_url
,$original_url
, and$canonical_url
.If these UTM parameters are already detected on the URLs being redirected to, Branch will not overwrite them.
For more information about UTM parameters, please read Google Analytic's Custom Campaigns article.
Expiration Behavior
The default expiration behavior will vary depending on the type of Branch Link you're using.
Link Type | Expiration |
---|---|
Short Links | Starting March 11, 2024. Expires 380 Days after creation. This expiration window is reset when the Short Link is clicked or if Branch receives a read request via the Deep Linking API. |
Long Links | Does not expire |
Quick Links | Does not expire |
Ad Links | Does not expire |
Create Deep Links
Short Links
Short links are the most common deep links created via the Branch SDK or Deep Linking API.
You can customize the subdomain of
example.app.link
, or change to your own personal domain (links.yoursite.com
)You can tailor the appearance of the shortcode to a custom
alias
during creationAliases can be short strings, e.g.
https://example.app.link/october-sale
Or can be a full link path, e.g.
https://example.app.link/product/id1234
Short links encapsulate link data inside them on link creation
e.g. existing link
https://example.app.link/fzmLEhobLD
Short links can have additional data appended to them
e.g. dynamic link
https://example.app.link/fzmLEhobLD?content_id=123
Methods of creating short links
Use Quick Links for fast link creation and easy tracking
Use our App SDK to create and share links within your app
Use our Web SDK to create links that help convert your web users to app users
Use our HTTP API to programmatically create links from your server
Use our Chrome Extension to generate links from your browser
Long Links
Long links can be created without a network call to Branch
Long links need link data to be added as a query string. Be sure to URI encode any URLs in the link.
e.g. existing link
https://example.app.link/fzmLEhobLD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
e.g. dynamic link
https://example.app.link/?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Long links need a
/a/
and a Branch Key if you use acustom link domain
e.g. existing link
https://link.example.com/5NPh/p4M09KRLrD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
e.g. dynamic link
https://link.example.com/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Long links need a
/a/
and a Branch Key if you use abnc.lt
e.g. existing link
https://bnc.lt/5NPh/p4M09KRLrD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
e.g. dynamic link
https://bnc.lt/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
When adding
tags
to a dynamic link, enter each tag separatelye.g.
https://example.app.link/?foo=bar&~tags=tag1&~tags=tag2
Configure Deep Links
You're free to add any of your own key-value parameters to a Branch link. These parameters will be passed to your app via the Branch SDK, however some keys will have specific extra effects.
Reserved Prefixes
Branch adds additional properties to your deep link data to explain the link.
Prefix | Usage |
---|---|
| Branch reserved keyword |
| Branch analytical data |
| Branch added values |
Keys for Reporting Analytics
These labels allow you to filter and organize your deep links.
Key | Usage |
---|---|
| Use channel to tag the route that your link reaches users. For example, tag links with |
| This is the feature of your app that the link might be associated with. For example, if you had built a referral program, you would label links with the feature 'referral' |
| Use this field to organize the links by actual campaign. For example, if you launched a new feature or product and want to run a campaign around that |
| Use this field to organize the links by actual campaign id. For example, if you launched a new feature or product and want to run a campaign around that |
| The customer campaign specified for the last attributed touch. can be specified on links by the client. |
| Use this to categorize the progress or category of a user when the link was generated. For example, if you had an invite system accessible on level 1, level 3 and 5, you could differentiate links generated at each level with this parameter |
| This is a free form entry with unlimited values |
| secondary publisher specified for the last attributed touch. passed by the ad network. |
| The ID of the secondary publisher specified for the last attributed touch. can be specified on links by the client. |
| The creative name specified for the last attributed touch. |
| The creative ID specified for the last attributed touch. |
| The ad set name specified for the last attributed touch. |
| The ad set ID specified for the last attributed touch. |
| The customer ad set name specified for the last attributed touch. can be specified on links by the client. |
| The ad name specified for the last attributed touch. |
| The ad ID specified for the last attributed touch. |
| The customer ad name specified for the last attributed touch. can be specified on the link by the client. |
| The keyword specified for the last attributed touch. |
| The unique ID for keyword of the last touch |
| The customer keyword of the last touch. Can be specified on links by the client. |
| The placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on display campaigns. |
| The ID of placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on display campaigns. |
| The customer specified placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on display campaigns. Can be specified on the link by the client. |
| Reference to the site where the ad was displayed. |
| Customer reference to the site where the ad was displayed. Can be specified on links by the client. |
These labels allow you to customize attribution windows for a single link.
Key | Default | Usage |
---|---|---|
| 7 | Time between a click and an install or reinstall. (i.e., |
| 1 | Time between a click and an open or web session start. (i.e., |
| 30 | Time between a click and a conversion event. Conversion events include commerce events (e.g. purchase, add to cart), all custom events, and all view events like pageviews & content views. (i.e., |
| 1 | Time between an ad impression and an install or reinstall. (i.e., |
| 1 | Time between an ad impression and an open or web session start. (i.e., |
| 7 | Time between an ad impression and a conversion event. Conversion events include commerce events (e.g. purchase, add to cart), all custom events, and all view events like pageviews & content views. (i.e., |
Custom Data
Pass any custom data to be read inside your app.
Key | Value | Usage |
---|---|---|
|
| Any key-value pair |
|
| Any key-value pair |
|
| Any key-value pair |
|
| Any key-value pair |
|
| Any key-value pair |
Redirections
Navigate to different locations based on device information. Navigation URLs must be websites, not Deep Links.
Note: Usage of redirection parameters on Branch Links requires a credit card on your account or set up an Enterprise account.
Key | Default | Usage |
---|---|---|
| Change the redirect endpoint for all platforms - so you don't have to enable it by platform. Note that Branch will forward all robots to this URL, which overrides any OG tags entered in the link. System-wide Default URL (set in Link Settings) | |
| Change the redirect endpoint for all platforms based on a lower-case Alpha-2 country code. For example, | |
| Redirect URL for desktop devices - mobile users will default to the app store. | |
| Change the redirect endpoint for iOS App Store page for your app (set in Link Settings) | |
| Change the redirect endpoint for iOS based on a lower-case Alpha-2 country code. For example, | |
| Change the redirect endpoint for iPads | |
| Change the redirect endpoint for Android Play Store page for your app (set in Link Settings) | |
| Change the redirect endpoint for Android based on a lower-case Alpha-2 country code. For example, | |
| Redirect to Samsung Galaxy Store on Samsung devices. Only link level control. Format should be | |
| Redirect to the Huawei App Gallery on Huawei devices. Only link level control. Format should be | |
| Change the redirect endpoint for Windows OS Windows Phone default URL (set in Link Settings) | |
| Change the redirect endpoint for Blackberry OS BlackBerry default URL (set in Link Settings) | |
| Change the redirect endpoint for Amazon Fire OS Fire default URL (set in Link Settings) | |
| Change the redirect endpoint for WeChat on iOS devices | |
| Change the redirect endpoint for WeChat on Android devices | |
|
| Force to open the |
|
| Force to open the |
|
| Force to open the |
|
| When a user returns to the browser after going to the app, take them to this URL. iOS only; Android coming soon |
|
| When a user on desktop returns to the desktop browser after going to the desktop app, take them to this URL. |
Forced Redirections
Prevent error messages from other apps when Branch Deep Links are clicked.
Key | Value | Usage |
---|---|---|
| 0 | Conservative mode. We don't try to open the app if the user can see an error. |
| 1 | Smart redirect mode. This is the default value that yields the same behavior as 0 until we know the user has the app installed through Branch persona data. In that case, force URI schemes to open the app. |
| 2 | Forceful redirect mode. Always try to force open the app, even if it risks showing an error message when the app is not installed. |
Forced redirections will not force open the app when the link is configured with an "Active Deepview" or "NativeLink" since they are intended to load a webpage and not redirect elsewhere.
OS level redirect modes can be enabled by utilizing the parameters
$ios_uri_redirect_mode
and$android_uri_redirect_mode
.Supported Apps
Facebook newsfeed iOS
Instagram iOS
Twitter iOS
Safari iOS
Firefox iOS & Android
Deep Linking
Navigate to different locations based on device information.
Key | Default | Usage |
---|---|---|
|
| Set the deep link path for all platforms - so you don't have to enable it by platform. When the Branch SDK receives a link with this parameter set, it will automatically load the custom URI path contained within |
| Set the deep link path for Android apps. When the Branch SDK receives a link with this parameter set, it will automatically load the custom Android URI path contained within | |
| Set the deep link path for iOS apps. When the Branch SDK receives a link with this parameter set, it will automatically load the custom iOS URI path contained within | |
| Set to true to make the link route to a NativeLinkâ„¢ used for enabling deferred deep linking on iOS 15+ & Private Relay. Can also be set to a deepview/template key to manually trigger the launch of a specific NativeLinkâ„¢ deepview. | |
| Set the deep link path for Desktop apps. You will have to fetch this parameter and route the user accordingly | |
|
| Lets you control the snapshotting match timeout (the time that a click will wait for an app open to match) also known as attribution window. Specified in seconds |
| Expiry date for the content and any associated link data. Represented as UTC epoch milli second. The maximum date this can be set is 31 days in the future. | |
|
| Set to |
|
| Control the timeout that the client-side JS waits after trying to open up the app before redirecting to the App Store. Specified in milliseconds |
|
| Control the timeout that the client side JS waits after trying to open up the app before redirecting to the Play Store. Specified in milliseconds |
| Text for SMS link sent for desktop clicks to this link. Must contain | |
| Set the marketing title for the deep link. | |
| Set to |
Content
Handle content properties.
Key | Default | Usage |
---|---|---|
|
| Cannot modify here. Needs to be set by the Branch Universal Object |
| Keywords for which this content should be discovered by. Just assign an array of strings with the keywords you'd like to use | |
| This is the unique identifier for content that will help Branch dedupe across many instances of the same thing. Suitable options: a website with pathing, or a database with identifiers for entities | |
| This is a label for the type of content present. Apple recommends that you use uniform type identifier as described here | |
|
| This will prevent click tracking and storage of link analytics. Deep link data will still flow into the app from link click to app open. |
Deepview
Enable / control active deepview properties.
Key | Default | Usage |
---|---|---|
|
| The name of the deepview template to use for iOS |
|
| The name of the deepview template to use for Android |
|
| The name of the deepview template to use for the Desktop |
Control passive deepview templates.
Key | Value | Default |
---|---|---|
| The name of the template to use for iOS. |
|
| The name of the template to use for Android. |
|
| The name of the template to use for Desktop. |
|
Link Appearance
Customize the appearance of your Branch Short Link.
Key | Default | Usage |
---|---|---|
| none | Specify a link alias to replace of the standard encoded short URL (e.g. |
Open Graph
The keys in the table below are used to handle Facebook properties.
Please note the following defaults Branch maintains for meta tags:
Branch Links created through the Dashboard will scrape the original web URL for meta tags.
Branch Links created via one of our APIs will scrape
$original_url
,$fallback_url
, and$desktop_url
for meta tags, in that order.
Branch Override Key | Open Graph Key | Default | Usage |
---|---|---|---|
|
| Set on dashboard. | Set the title of the Deep Link as it will be seen in social media displays. |
|
| Set on dashboard. | Set the description of the Deep Link as it will be seen in social media displays. |
|
| Set on dashboard. | Set the image of the Deep Link as it will be seen in social media displays. |
|
| Set on dashboard. | Set the image's width in pixels for social media displays. |
|
| Set on dashboard. | Set the image's height in pixels for social media displays. |
|
| Scraped from | Set a video as it will be seen in social media displays. |
NA |
| Scraped from | Set the URL to an audio file. |
|
| Set the base URL of the Deep Link as it will be seen in social media displays. | |
|
| Set the type of custom card format link as it will be seen in social media displays. Don't set this property when sharing Deep Links on Facebook. | |
| NA | Advanced, not recommended. | |
| NA | Set on dashboard. | Rarely used. |
Handle Twitter properties.
Key | Default | Usage |
---|---|---|
| Set the Twitter card type of the link (e.g. | |
| Set on dashboard | Set the title of the Twitter card |
| Set on dashboard | Set the description of the Twitter card |
| Set on dashboard | Set the image URL for the Twitter card |
| Set the site for Twitter | |
| Set the app country for the app card | |
| Set the video player's URL. Defaults to the value of | |
| Set the player's width in pixels | |
| Set the player's height in pixels |
Other Reserved Keys
Key | Usage |
---|---|
| Used by Branch to determine if a deep link is a valid Branch link or not. |
| Used by Branch to determine if a deep link is a valid Branch link or not. |
| Used by Branch to contain top-level link information. If this parameter is added to a Branch link via appending query params, it will be dropped. It can be safely used when creating a link manually via the dashboard. |
| If this parameter is added to a Branch link via appending query params, it will be dropped |
| If this parameter is added to a Branch link via appending query params, it will be dropped. |
Custom Tags
Handle custom meta tags
Key | Value |
---|---|
| Valid stringified JSON dictionary of the tags’ keys and values |
Valid dictionary example:
"{"twitter:player:stream": "https://branch.io"}"
. This will result in the following meta tag:If you create the link via the Dashboard, don’t worry about stringifying the dictionary. It will be done automatically.
apple_touch_icon is a special key in the dictionary. If you set it, we will add a tag to the scraped HTML page. This will allow you to show a custom icon for previews in iMessage, Safari Bookmarks, Slack, etc.
Universal Object
Branch Universal Object
The Branch Universal Object are fundamental to tracking and logging events with Branch. To learn more, view our full guide here.
Read deep links
Deep link data gets sent from your link to your app integration
Data structure
Example deep link data structure
{
"randomized_bundle_token": "427469360685348303",
"link": "https://example.app.link?%24randomized_bundle_token=427469360685348303",
"session_id": "429691081177874743",
"data": {
"$canonical_identifier": "item/1503684554354.28",
"$canonical_url": "https://example.com/home?utm_campaign=test&deeplink=value",
"$desktop_url": "http://example.com/home",
"$randomized_bundle_token": "427469360685348303",
"$og_description": "My Content Description",
"$og_image_url": "http://lorempixel.com/200/200/",
"$og_title": "46D6D28E-0390-40E4-A856-BD74F34D24C8",
"$publicly_indexable": 1,
"+click_timestamp": 1503684563,
"+clicked_branch_link": true,
"+is_first_session": false,
"+match_guaranteed": true,
"custom": "blue",
"random": "FE848A5B-78F7-42EC-A253-9F795FE91692",
"added": "1503684554354.33",
"~campaign": "new launch",
"~channel": "facebook",
"~creation_source": 3,
"~feature": "sharing",
"~id": 429691043152332059,
"~referring_link": "https://example.app.link/X7OsnWv9TF",
"~stage": "new person",
"~tags": [
"one",
"two"
]
}
}
Callback values
Additional properties read from the
initSession
within your app and website integrations
Key | Usage |
---|---|
| Automatically generated 18 digit ID number for the link that drove the install/open, if present (0 for dynamic and 3P links) |
| The referring link that drove the install/open, if present |
| Where the link was created ( |
| If the match was made with 100% accuracy |
| The referrer for the link click, if a link was clicked |
|
|
| Whether or not the user clicked a Branch link that triggered this session. |
| App was opened from a non Branch link (third party, invalid Branch deep link, or Branch key mismatch). |