A deep link is a link that goes not only to your app, but to a specific piece of content within your app. With deep linking, you send people directly to information they are interested in when they open your app for the first time.
By using deep linking in your app ads, you are removing extra steps between clicking the ad and getting to the content that made someone want to open your app. This provides a more seamless customer experience. Without deep links, people will have to search through your app for the content they are looking for, and you risk them losing interest.
Because the first landing point in your app is related to the attractive idea that motivated a person to tap the ad, they are more likely to engage with the content of your app.
On iOS, deep linking works only with ads. As a result, you can't use deep linking with other things, like app invites.
Advertiser ID collection must be enabled for deferred deep linking to work.
More information on Advertising ID Collection here.
For Android apps, read the official tutorial Create Deep Links to App Content for setup instructions.
In the App Dashboard add deep linking information for your app.
AndroidManifest.xml
. The class name should take the form com.example.androidapp.MainActivity
.://
. For example, if your URL scheme is mytravelapp://
, enter mytravelapp
.APP_STORE_ID
.Deferred deep linking allows you to send people to a custom view after they install your app through the app store.
You must use deferred deep linking if you target people who did not install your app yet. If you are only targeting people who already installed your app, you do not need to add deferred deep linking.
Note: Deferred Deep Linking is no longer supported for the [POST /{ad-id}
endpoint](https://developers.facebook.com/docs/marketing-api/reference/adgroup/.
The Facebook SDK for iOS and Android includes the product App Links, which will enable you to support deferred deep linking in your app. In addition to your deep link implementation, just add the following code to your app to handle deferred deep links:
AppLinkData.fetchDeferredAppLinkData(this,
new AppLinkData.CompletionHandler() {
@Override
public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
// Process app link data
}
}
);
Starting from v5.0.0, we introduce a flag for disabling automatic SDK initialization. If you follow the GDPR compliance in GDPR Compliance in FB SDK Best Practices for GDPR Compliance re-enable automatic initialization first after an end User provides consent before fetching deferred link:
// Get user consent
FacebookSdk.setAutoInitEnabled(true);
FacebookSdk.fullyInitialize();
AppLinkData.fetchDeferredAppLinkData(this,
new AppLinkData.CompletionHandler() {
@Override
public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
// Process app link data
}
}
);
Class Reference: Android > AppLinkData | iOS > FBSDKAppLinkUtility
You can verify your Facebook SDK and deep link setup within our App Ads Helper in the tools & support section. We recommend verifying your setup before you start running deep link ads.
Verify Deep Link SetupIn the Ads Manager, when creating your ad, pay attention to the following settings:
Target Platform: In "Who do you want your ads to reach?" use:
Android only
for the setting platform.iOS only
for the setting platform.Add Deep Link: In "What text and links do you want to use?", add your deep link; for example, mytravelapp://tripId=SF
or a URL with Facebook App Links metadata implemented.
If you chose the App Install objective, you can also specify a Deferred Deep Link or a URL with Facebook App Links metadata implemented to take users to a specific location in the app after installing.