Overview
You can use deep links for your Journeys, Ads Links, Quick Links, and Email. Use this reference article to help you configure your default and custom link behavior.
Read our Create Web Links or Create App Links articles for instructional content on creating links using different methods.
In this reference article, you can learn about:
Note
Information about web links in this article is only relevant for the Engagement product, read our Create Web Links article for web links information relevant to the Activation product.
Create deep links
You can create both web and app deep links with the Branch Growth Platform. Links can be either short or long.
Short links
Short links are the most common deep links created via the Branch SDK or Deep Linking API. You can use a Branch-provided app.link
, or use a custom domain (for example, links.yoursite.com
). You can tailor the appearance of the shortcode to a custom alias
during creation. Aliases can be short strings (for example, https://example.app.link/october-sale
),or can be a full link path (for example, https://example.app.link/product/id1234
).
Short links contain link data inside them on link creation (for example, existing link https://example.app.link/fzmLEhobLD
). Short links can also have additional data appended to them (for example, dynamic link https://example.app.link/fzmLEhobLD?content_id=123
).
Methods of creating short links
Check out our Create Web Links and Create App Links articles to learn more about creating short links.
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.
Existing link example:
https://example.app.link/fzmLEhobLD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
orDynamic link example:
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 a custom domain.
Existing link example:
https://link.example.com/5NPh/p4M09KRLrD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Dynamic link example:
https://link.example.com/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 separately. For example: https://example.app.link/?foo=bar&~tags=tag1&~tags=tag2
.
Validate deep link behavior
Use the Link Validator to view the expected and actual behavior of your links.
Expand to view information about expected link behaviors
Default link behavior
If your user does not have your app installed:
User
clicks
on a Branch deep link.Device
navigates
to the fallback (for example, an app store or website).We support the following app stores:
Apple App Store
Google Play
Huawei App Store
Vivo App Store
Oppo App Store
Baidu Mobile Assistant
User
installs
andopens
your app.Branch passes deep link
data
into your app.
If your user does have your app installed:
User
clicks
on a Branch deep link.Device
opens
your app or navigates to expected link behavior.Branch passes deep link
data
into your 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
Note
This information is only relevant to the Engagement product. Activation links do not require /e/ or -web to open in a web browser.
If your app is not installed: device navigates
to the fallback (for example, an app store or website).
If 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 Dashboard.Add 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
Note
This is 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 |
Configure deep links
You can 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.
Link data
Specify where to deep link users into the app, or configure advanced settings like device-based targeting, attribution windows, and custom keys specific to your app.
Popular
The most popular and commonly used data options.
Name | Key | Definition |
---|---|---|
Default Deep Link Path |
| Sets a default deep link path for all platforms. When a user opens a Branch Link with this parameter, the Branch SDK will route them to the specified in-app content path. |
iOS Deep Link Path |
| Sets the deep link path for iOS apps, which overrides the default path. When a user on an iOS device opens a Branch Link, the Branch SDK will route them to the specified in-app content path. |
Android Deep Link Path |
| Sets 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. |
Default Fallback URL |
| Change the redirect destination for all platforms so you don’t have to enable it by platform. 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). |
Original Web URL |
| The corresponding web URL for the in-app content. |
Unique Content Identifier |
| This is the unique identifier for content that will help Branch dedupe across many instances of the same thing. Suitable options include a website with pathing, or a database with identifiers for entities. |
iOS Passive Deepview Template |
| The name of the template to use for iOS. |
Android Passive Deepview Template |
| The name of the template to use for Android. |
Always Deep Link to App |
| Set to false to make links always fall back to your mobile site. Does not apply to Universal Links or Android App Links. |
Deep Linking Window (Seconds) |
| 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. |
Default URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app. |
iOS URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app on iOS. |
Android URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app on Android. |
Deep linking parameters
Set the specific in-app content a user is routed to.
Name | Key | Definition |
---|---|---|
Default Deep Link Path |
| Sets a default deep link path for all platforms. When a user opens a Branch Link with this parameter, the Branch SDK will route them to the specified in-app content path. |
iOS Deep Link Path |
| Sets the deep link path for iOS apps, which overrides the default path. When a user on an iOS device opens a Branch Link, the Branch SDK will route them to the specified in-app content path. |
Android Deep Link Path |
| Sets 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. |
Desktop Deep Link Path |
| Sets the deep link path for desktop apps. You must fetch this parameter from the link to route the user to the correct destination. |
Link behavior and redirects
Set where to send users if the app cannot be opened (for example, if it is not installed).
Note
Using redirect parameters on Branch Links requires a valid credit card to be entered on your account. Alternatively, you can set up an Enterprise account.
Expand to view information about forced redirects
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
Name | Key | Definition |
---|---|---|
Default Fallback URL |
| Sets a single fallback URL for all platforms where users are redirected if the app cannot be opened or if they do not have the app downloaded. If the link is a web-only link, this will be the destination. Note: Branch forwards all web crawlers (robots) to this URL, which overrides any Open Graph (OG) tags you set. |
iPad Redirect URL |
| Sets a specific redirect URL for iPad users, overriding the |
Samsung Galaxy Store Redirect URL |
| Redirect users on Samsung devices to the Samsung Galaxy Store. You must provide the link in the following format: |
Huawei App Gallery URL |
| Redirect users on Huawei devices to the Huawei AppGallery. The URL format must following Huawei’s App Linking guide. |
Force Web Open |
| Forces the link to open the web URL set in |
Mobile Web Only (Desktop App) |
| When set to |
Desktop Web Only (Mobile App) |
| When set to |
Always Deep Link to App |
| Set to |
Enable iOS NativeLink |
| When set to true, the link routes through NativeLink to enable deferred deep linking for iOS 15+ and Private Relay users. |
Default URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app. |
iOS URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app on iOS. |
Android URI Redirect Mode |
| Allows you to control how and when Branch uses URI schemes to open your app on Android. |
iOS App Store Redirect Delay (Milliseconds) |
| 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. |
Android Play Store Redirect Delay (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. |
Attribution and analytics control
Control the time window during which installs, opens, or conversions can be attributed to a link click or impression.
Name | Key | Definition |
---|---|---|
Click-to-Install Window (Days) |
| Time between a click and an install or reinstall. For example: |
Click-to-Open/Session Window (Days) |
| Time between a click and an open or web session start. For example: |
Click-to-Conversion Window (Days) |
| Time between a click and a conversion event. Conversion events include commerce events, all custom events, and all view events. For example: |
Impression-to-Install Window (Days) |
| Time between an ad impression and an install and reinstall. For example: |
Impression-to-Open/Session Window (Days) |
| Time between an ad impression and an open or web session start. For example: |
Impression-to-Conversion Window (Days) |
| Time between an ad impression and a conversion event. Conversion events include commerce events, all custom events, and all view events. For example: |
Deep Linking Window (Seconds) |
| 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. |
Deep Link Only (No Attribution) |
| Set to true for the links to only support deep linking without any attribution for that link. Note: Using this will lose all link metrics when set to |
Disable Click Tracking & Analytics |
| 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. |
Analytical data keys
These labels allow you to filter and organize your deep links. Refer to the “Reserved prefixes” section of this article to learn more about the ~
prefix.
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. |
Social media previews
Customize how a link preview appears when shared on social media platforms.
Name | Key | Definition |
---|---|---|
Social Media Image Width |
| Set the image’s width in pixels for social media previews. |
Social Media Image Height |
| Set the image’s heigh in pixels for social media previews. |
Social Media Video URL |
| Set a video as it will be seen in social media previews. |
Social Media Base URL |
| Set the base URL of the link as it will be seen in social media previews. |
Social Media Card Type |
| Set the type of custom card format link as it will be seen in social media previews. Don’t set this property when sharing deep links on Facebook. |
Advanced Social Media Redirect |
| Advanced, not recommended for most use cases. Set a custom URL that we redirect social media bots to in order to retrieve all the appropriate tags. |
Twitter (X) Card Type |
| Set the Twitter card type of the link (for example, player). You must allowlist your deep link with the Twitter Card Validator. |
Twitter (X) Site Name |
| Set the site for Twitter (X). |
Twitter (X) App Country |
| Set the app country for the app card. |
Twitter (X) Video Player URL |
| Set the video player’s URL. Default to the video value of |
Twitter (X) Player Width |
| Set the player’s width in pixels. |
Twitter (X) Player Height |
| Set the player’s height in pixels. |
Custom Social Media Meta Tags |
| Valid string JSON dictionary of the tags’ keys and values. For example: |
Content metadata
Set the content the link points to, helping with organization, deduplication, and search indexing.
Name | Key | Definition |
---|---|---|
Unique Content Identifier |
| This is the unique identifier for content that will help Branch dedupe across many instances of the same thing. Suitable options include a website with pathing, or a database with identifiers for entitie |
Original Web URL |
| The corresponding web URL for the in-app content |
Publicly Indexable |
| Cannot modify here. Must be set by the Branch Universal Object. |
Content Type Label |
| This is a label for the type of content present. Apple recommends that you use uniform-type identifier as described here. |
Content Expiration Date |
| Expiry date for the content and any associated link data. Represented as UTC epoch millisecond. |
Deepview templates
Templates for Deepviews on iOS and Android.
Name | Key | Definition |
---|---|---|
iOS Passive Deepview Template |
| The name of the Deepview template to use for iOS. |
Android Passive Deepview Template |
| The name of the Deepview template to use for Android. |
Custom data
Create custom keys to pass any custom data to be read inside your app. For example:
Custom key (example) | Custom value (example) | Custom usage (example) |
---|---|---|
random | 123 | Sending random information to your app. |
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. |
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. |
Reserved prefixes
Branch adds prefixes to each deep link data key to explain the key. You will see this added to the beginning of the different types of keys below.
Prefix | Usage |
---|---|
| Branch reserved keyword. |
| Branch analytical data. |
| Branch added values. |
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). |