In our series with Branch Metrics, we’ve covered the basics of deep linking and how it can increase downloads and retention. Now we’re going to explain how to add deep links to your mobile app. 

If you’re unfamiliar with deep links, they are links that take users to specific content, rather than a generic page of the app or mobile website.

Deep link integration is often used to share content and drive downloads from user to user via SMS, email, or social — it’s the best way to equip your users for Internet word-of-mouth.

One or all of these methods may be right for your app, and thankfully it’s not too complicated to get started.

Evan Barry, Marketing Manager at Branch Metrics, wrote the first half of this post, explaining all the different ways that you can use deep links.

The second half is based on a webinar that Jed Wheeler, Branch Developer Relations Lead, recently presented to the ThinkApps community. It goes into further detail on the technical aspects of integrating deep links. 

Deep Link Integration - share window

Using Deep Links in SMS

There’s a reason why SMS is typically the first option and the largest focus for app developers: it’s an instant way to grab the attention of anyone you want to reach.

When it comes to deep linking, SMS remains the perfect use case for sharing app content. Many of the apps you know and love use the share sheet (above) to prompt you to share the app (or content within the app) with friends. 

Deep Link Integration - iHeartRadio case study

For example, say you’re listening to a cool radio station on iHeartRadio that you think your friend would enjoy. Using the share feature that the developer has built into the app, you can select to share via message, and a text message will be auto-populated with a deep link.

The developer can choose to send a custom message with the deep link, a picture, or allow the user to choose what they want to say.

When the friend receives the text message, a smart redirect function (below) will direct them to the appropriate place, depending on whether or not they already have the app installed.

Deep Link Intergration - Deepview

If they don’t yet have the app installed, the developer can choose to send users to the appropriate app store* or a custom mobile web splash, such as a Deepview.

Although it may seem counter-intuitive to add an additional step between SMS and an app store, sending users to a Deepview actually increases conversion to download by two to six times because the would-be users get a preview of the in-app content they are going to see.

In the case of iHeartRadio, after the users reach the app store and download the app, they will be taken directly to the radio station in the app that was shared with them.

*If a user already has the app installed, they will be taken directly to the radio station in the app after they click the link.

Deep Link Intergration - gogobot

Personalized Welcomes

Other than content sharing, deep links on SMS are commonly used for personalized welcomes. A personalized welcome is a unique welcome landing based on the context of where a user came from or who shared the link with them.

For instance, Gogobot uses a personalized welcome to show users the Facebook profile picture and name of the user who sent them the deep link (above). Having a personalized welcome, compared to a generic welcome screen, increased Gogobot’s conversion to sign-up by 78%.

Moreover, users who come from a deep link are twice as likely to remain active users of your app. Because of this, deep linking via SMS is a great way to increase downloads by users with high LTV (Lifetime Customer Value).

Deep Link Integration - 8tracks

Using Deep Links in Email

Deep links are a very valuable tool when it comes to measuring the impact and success of email campaigns. With Branch deep links, marketers are able to track the clicks, views, and installs associated with each link they create.

Additionally, since Branch handles the routing of users in every use case, marketers using Branch links in emails don’t have to worry about whether or not a user has an Apple or Android phone. Rather than providing a separate link for each type of user, a single Branch link can handle a click from any channel and any operating system.

Re-Engagement

8tracks, a user-generated music playlist service, uses deep links in their re-engagement emails to try and bring back people who haven’t used the app in a while. To do so, they add a “Get the App” button in their emails that uses a Branch deep link (pictured above).

Any email marketing client can tell you the number of link clicks you’re getting on certain buttons. But with Branch, you’re able to look at the number of clicks, downloads, and even sign-ups per email.

With this information, you can test which type of emails works best to drive people to the app, while increasing app users. Users that downloaded the app using this button have a 1-month retention rate that’s 2.3 times higher than the average 8tracks install.

Deep Link Integration - desktop_url

Since emails are still split between opens on desktop and mobile, it’s important to use a deep linking service that optimizes the experience on each platform. The diagram above demonstrates how Branch handles link clicks on desktop.

Using the parameter $desktop_url, developers can set where they want desktop clicks to be routed. If they haven’t set $desktop_url, Branch automatically hosts a “text me the app” page that will encourage people to enter their phone number to receive a link to download the app.

Across the Branch platform, we’ve actually seen that the clicks on “text me the app” links have the highest conversion to download, at around 42%.

Deep Link Integration - Text Me the App

However, if a developer would like to redirect a user to somewhere other than a Branch-hosted “text me the app” page, they can set $desktop_url to anywhere they’d like. For instance, Hotel Tonight built their “text me the app” widget seamlessly into their website.

Launch

In addition to re-engagement, deep linking from email is a great way to launch your app.

If you’ve been collecting email addresses in advance of your launch, you can use deep links to bring those new users to any content you want them to see when they first download the app.

Using Deep Links from Ads

Deep links are a powerful way to give you a better ROI on ad campaigns. This can include Google search ads, Facebook install ads, Twitter ads, and more.

Google Search Ads

Hotel Tonight, which is one of Branch’s most innovative partners, is using deep links for their Google Search ads to drive down the cost per install and increase the install-to-booking rate. Deep links shorten the long conversion flow that had previously made mobile campaigns unprofitable.

With Branch links, a single link can be placed anywhere (in this case, it was the destination URL of a mobile AdWords campaign), and the link will figure out where to send the potential customer.

Before Branch, users had to take five steps (with manual in-app search) in order to convert:

Deep Link Integration - standard deep link flow

With Branch links, Hotel Tonight can route users intelligently based on whether they have the app.

If they’ve installed the app, a single click takes them directly into the app to view hotels in their destination city. If they don’t have the app, the new user is taken to the appropriate app store to install Hotel Tonight. They see their desired content immediately upon opening the app.

The process with deep linking is cut in half, with no manual in-app search: 

Deep Link Integration - branch deep link flow

Using Deep Links via Social

For some content, users would like to share across social networks rather than via email or text.

However, since Google, Twitter, Facebook, Apple, Pinterest, and other platforms handle deep links differently, it’s important to choose a deep linking platform that handles every possible use case. That way you don’t have to worry about where your links are posted.

Out of the box, Branch automatically supports all deep linking standards.

Deep Link Integration - Chosen app

Deep Link Integration - Chosen app 2

Twitter

Some apps choose to only share via social networks in an attempt to reach a larger audience. The Chosen app, which lets you upload videos of yourself performing songs to be voted on by other users (or judges), allows you to share videos on Facebook or Twitter. You can also share other people’s videos that you just saw.

When someone clicks on a link from Twitter, they are taken to a Deepview if they don’t yet have the app. After downloading the app, they are taken directly to the shared video within the app. If a user who clicks on a link already has the app, it will be opened automatically and the user will be brought directly to that video.

Apps use social networks as an additional channel for sharing, giving the user multiple options where they can share interesting content. With Branch deep links you can be sure that your links will work, no matter where they’re posted.

Deep Link Integration - Branch SDK

How to Create Deep Links in Branch

Getting started with Branch is simple for anyone, from marketers and product managers to developers. These three links are good places to start:

start.branch.io: This is where you sign up for an account (no payment information needed) and can find a step-by-step quickstart guide to SDK integration.

dev.branch.io: This page provides complete documentation on all SDKs and APIs, as well as deep product information. This may be the best place to start if you’re a developer.

support.branch.io: For extra support, go here for user community forums and FAQs. The Branch team follows the discussion boards and fellow users are there to help, as well.

Once you’ve got your account set up, there are several ways you can start creating deep links right away.

Deep Link Integration - Branch dashboard

In the Branch Dashboard

This method is best for deep-linked advertising, email retention campaigns, links from a website, and any other use of deep linking that requires a static link. You do not have to have the SDK installed yet.

Via the Branch API

Taking the API approach is useful if you have your own dashboard that you use because all documentation is public.

In Your App

These deep links are created on your end using the Share functionality in the Branch SDK. They can be incentivized for organic referrals, viral content shares, or dynamically-related links to friendly apps with whom you have cross-promotional agreements.

Deep Linking Integration - configuring deep linking

SDK Integration

After you’ve launched the SDK, here’s what to do next:

1. Configure and Initialize Branch

To install and start running the Branch SDK, take the following steps. (If you need additional guidance, Branch has quickstart guides for all platforms.) 

iOS: Branch suggests you use CocoaPods to install the Branch SDK on iOS. Just add pod "Branch" to your podfile and run pod install from the command line.

For a step-by-step guide to installing Branch without using CocoaPods, click here.

Android: In the Android manifest, copy in the intent filter (see image above), which will clarify the context the user is looking for. Change :yourapp under android:scheme to the URI scheme* you’ve registered.

*URI is “Uniform Resource Identifier.” This might sound intimidating, but a URI is what you may have been referring to as a URL. A URL is a link with the addition of a network connection like http:// or ftp://. (If you feel like digging deeper, Daniel Miessler has answered all of your questions here.) 

2. Start the User Session

In this step, you input user data so that Branch knows what info is useful to pass on to you.

A new Branch session starts every single time your app is opened and checks to see if the user came from a link. This is where you register a callback method that will return any deep link parameters upon link click. Please note that the callback function is called 100% of the time, even when the network is out.

As a session starts, user info comes in so that Branch can tie the user’s behavior back to the downstream impacts of that behavior. Make sure you put some pivotal pieces of code in place to get started:

iOS: First, open your project’s AppDelegate.m (orAppDelegate.swift) file.

Add #import "Branch.h" at the top of the file (Objective-C only). Then, find the line which reads:

and paste this right below it:


Android: Open up your splash activity (or the activity you registered the intent for above), then add the onStart lifecycle method:

Initialize the session and register your deep link router. Take note of how the instance is retrieved. If you are not using automatic session management, then you will need to use getInstance(Context context).

3. Create Links

With Branch, the links are where all of the action takes place.

The most important parts of Branch links are the embed key and value deep link metadata. Branch ensures this gets delivered to the app with the clicking user. The other fun, functional parts are the label feature and channels for analytics on the dashboard.

In this stage, you can drop in arbitrary tags, channels, names, messages, open graph tags and stages, all to navigate your user to where you want them to go and when you want them to go there.

All of that information is combined into a message that is sent to the API, then the response of that message comes back to you and includes the URL, which is dropped into your share function.

The whole process is invisible to the end user and takes just a fraction of a second. With that, you have dynamic deep links that work everywhere.

iOS: There is more info on iOS content sharing on Branch’s website. But to get you started, here’s the method call:

Deep Link Integration - branch-share-link

Android: Branch suggests using their builder method (see image above) to generate a Branch link.

Here’s how to generate a Branch link via the builder class:

Deep Link Best Practices

1. Identify Your Users

This is what deep linking is all about — knowing who shared the link and who came in from those shares.

Branch automatically tracks unique devices. However, to make full use of its powerful API, you should also identify users with the form of unique identification that your app utilizes.

Invoke the setIdentity call whenever you create or login a user. This should be done after you have successfully initialized a session. Add this line of code:

Also be sure to add a logout call anywhere you allow the user to log out.

2. Specify Channels and Add Open Graph Tags

By specifying channels and adding custom tags you can specify your data and create a more unique customer experience. This data will be automatically embedded into the meta tags and will show up in your analytics, providing deep detail on who shared what, where, and how.

Open Graph meta tags (aka, OG tags) allow you to select and customize what image and information shows up when a use shares a link from your site on Facebook.

For example, go:title sets the link title at the top of the snippet, go:site_name is your site url under the title, go:description provides a few lines from the article or page, and go:image is where you put the URL for the image you want displayed.

It’s best to customize this information so that your shared links are appealing and are highlighting the information that you want people to see first. Branch enables OG customizations, so use that to your advantage.

3. Leverage Referrals

To incentivize sharing and drive viral growth, Branch offers several ways to leverage referrals.

  • User attribution through a tracking, download URL. This tells you when an existing user who you empower with a Branch link drives a new install.
  • Custom rewarding rules tied to events (install, signup, purchase, etc) within your app.
  • User reward tracking/storage (integer balance). This approach leaves the actual user-facing rewarding to you but stores how many credits have been earned through Branch’s reward rules. This makes it easy for you to just check the balance of credits in the app from Branch, give the user some reward, then clear the credit balance on their server.
  • Credit transaction history. At any time, via Branch’s API or SDK, you can retrieve the full credit history of the user.
  • Coupon codes for each user. You can use Branch’s system to generate referral codes and allow users to redeem them through the system. Branch tracks which user owns the code and gets rewarded when a new user redeems it.

4. Track Relevant Events

As you track trends with your deep links, you’ll be able to pick out relevant events and trending actions to capitalize on them.

To enable tracking, input this metadata and watch the information gather in your dashboard:

  • event: string, required – name of the event to be tracked. Use the events you track to create funnels in the Branch dashboard.
  • metadata: object, optional – object of event metadata
  • callback: function, optional

Deep Link Integration Leads to Quality Users

Deep link integration will lead to the kind of users that you’d usually have to create special campaigns and outreach in order to recruit. But now, users can invite their friends in a way that’s more personal and unique, which will lead to more active users than your cold calls.

As we’ve demonstrated in this post, deep links are simple and seamless to integrate and yet can be incredibly powerful. It’s easy to see why they’ve become central to the user experience for any mobile product.

Images via Branch Metrics and Unsplash.

Ready to start your project?

Learn how ThinkApps can get your product launched faster, better, and with more value than you knew was possible.

@ThinkApps on Twitter