深度链接 API

Use Branch Links to route customers to the content they expect.

549549

概述

Branch gives you peace of mind that your links will work in every edgecase to route users to the best destination with the industry’s highest matching accuracy, by combining every deep linking standard into a single, simple package. Easy to implement, and always up to date.

Deep Linking Use Cases:

  • Direct deep linking users who have the app installed already to relevant content.
  • Deferred deep linking users who do not have the app installed to relevant content immediately after the first install.
  • Customized/branded URLs
  • Store custom data parameters in link data

它是如何工作的?

  1. User clicks a link.
  2. If user has the app installed: the app opens and routes to relevant content.
  3. If user doesn't have the app installed:
    a. Route user to App/Play store to download the app and routes to relevent content on app open.
    b. Route user to mobile web relevent content

整合指南

🚧

需要开发人员

Developers knowledgeable with APIs, Web, and Mobile Development are required.

1. Implement the Branch SDKs to your mobile app.

Please visit our Developers Hub to implement the Branch SDK on both iOS and Android.

2. Set Up Deep Linked Routing

Depending on how your mobile app is routing to in-app content will determine how you will create and tag your Branch Links.

3. Create your Branch Link

Branch Link creation options:

4. Configure your Branch Link

When configuring your Branch Link you must make sure you are adding the correct key/value pairs to the data dictionary to ensure they make it into the app when it opens from a Branch Link click.

18441844

Additional details on configuring your Branch Link can be found here.

5. Test your Branch Link

Click the Branch Link on your mobile device and it should go through the flow outlined in How does it Work?.

6. [Optional] Set up NativeLink™ Deferred Deep Linking

For NativeLink™ Deferred Deep Linking, please follow our guide here.

最佳实践

Deep Linked Routing with $canonical_url

A canonical URL is a Branch referred term that represents the corresponding web URL for the in-app content. If your app can already deep link using web URLs, it is recommended to use the $canonical_url key with the web URLs value for deep linked routing for the app. This reduces the level of effort as $canonical_url is often automatically applied as Branch Link data for products like Journeys and Email; therefore, there is not an additional need to add extra data to a link.

For example, a shopping brand that has both a website and a mobile app will have equivalent experiences for the user to get to related content and it can be identified with a canonical URL. A web URL might look something like this:

https://www.myshop.com/category/productName

For a hotel/travel brand, a canonical URL might look something like this:

https://www.mytravel.com/Hotel-Search?rooms=1&adults=2&destination=Bangkok%20(BKK%20-%20Suvarnabhumi%20Intl.)&regionId=4934466&latLong=13.687353%2C100.74995&startDate=2021-09-23&endDate=2021-09-24&d1=2021-09-23&d2=2021-09-24

The different parts of the URL can be used for deep linking the user to in-app content.

Open Graph Tags in Branch Links

When creating your Branch Link, you can add Open Graph tags to enhance its look and feel in a social graph. Adding these tags should make your Branch Link look better in channels like SMS or on social media posts. The following tags can be used in your Branch Link:

Open Graph Key

描述

$og_title

The title of your object as it should appear within the graph

$og_description

A one to two sentence description of your object.

$og_image_url

An image URL which should represent your object within the graph.

This is automatically set when setting the Social Media Tags if you are creating a Branch Quick Link or scraped when setting $canonical_url

18321832

测试 & 问题排查

Please following the following guide for testing troubleshooting your deep links:


这个页面对您有帮助吗?