Back to News for Developers

Demystifying Mobile Deep Linking in Facebook Ads

February 13, 2018BySean Bedford

Deep linking is a technology that helps ensure that a user transitions from your advertisement to the most relevant section of your app. For example, if on the Facebook app, you tap on a shoe in an advertisement, you would ideally be taken to the product page for that shoe within that mobile site or application.

You want to ensure users get the best possible experience when interacting with your adverts, which can give the highest likelihood for a conversion. Usually, this means taking them to the place that offers the best customer experience, which is likely the place that offers the most user context (previous product views, saved login credentials, saved addresses, saved card numbers, and so on). If you have an app, this is the place where this personal information is likely already stored for a “loyal” user.

To successfully implement deep linking, it's necessary to account for users—both from Facebook applications and from the Facebook mobile site. Due to technical reasons, there are two different approaches to consider.

Deep Linking to Your Application from an Ad in the Facebook App

When to use

  • You have an application with the ability to purchase products or subscriptions
  • That application has proven higher engagement/user metrics than your m-web channel

Considerations

  • How to handle and structure deep links within your application to link to all relevant application functionalities
  • How to handle requests from users who do not have your application installed
  • How to handle the user experience from the Facebook app to the Facebook in-app browser, or your own mobile app.

Technical Implementation

  • Implement deep linking in your application. These links can be anything, but should provide enough information to link to a specific product or offering; for example, myawesomeapp://product?id=1234.
  • Implement deferred deep linking using the Facebook SDK. This ensures that if a user must follow a flow to install the application, you still receive the deep link as a “deferred” deep link when the user launches the app for the first time, and can then decide how to handle that previous request.
  • Implement adverts that use deep link capabilities. Facebook allows for fallback behavior to send the user to the Apple App Store, Google Play, or a mobile URL of your choice if the user doesn't have the app installed.

Deep Linking to your Application from an Ad in the Facebook Mobile Site

When to use

As above; your application is the “best” channel for a user to be on.

Considerations

  • All considerations as above.
  • Additionally, you should consider the reason that a user is using the Facebook mobile experience and not the Facebook app. Do they have limited disk space? Maybe they prefer a web experience?

Technical Implementation

In the Facebook app, we can do some client-side validation to ensure that the user truly has the app installed. In the m-site, there is no client-side validation, so deep linking directly is risky because the user might have uninstalled the app, or the user is using another device than the one on which he installed the app. This means that from the Facebook m-site, we always use the fallback web URL as specified in your advert.

Fortunately, both Apple and Google have an approach that enables you to forward into your application, based on user preference of application or mobile site.

  • For iOS, implement Universal Links on your mobile site.
  • For Android, implement App Links on your mobile site.
  • In your application (Android and/or iOS), write code that handles incoming Universal Links or App Links and redirects the user to the appropriate location.

These respective technologies work similarly; you place a file on your website, indicating the application to use. The mobile OS looks for this file first and then redirects to an appropriate application based upon the set of URLs that you specify in this file. If the file is not found, or the URL is not listed in the file, then the mobile OS displays the requested URL in the web browser.

There are also third-party services that can simplify this set up to enable you to always use a URL without needing to implement Universal or App Links. To maintain full control of your experience though, the solution described above is the best approach.

Why can't I just always use Universal or App Links?

Placing an m-site link in your ad (instead of using Facebook's deep link functionality) would work, but there is a limitation with this approach. In the situation where users don't have your app installed and are using the Facebook app, this results in the Facebook app always opening the m-site in the in-app browser.

In some circumstances this may not be what you want, and you might prefer to redirect users to the relevant App Store or Google Play page. In this case, it's better to follow the guidance above for Deep Linking to Your Application from an Ad in the Facebook App.


Tags: