Deep Linking in App Ads
Create Ad Verify Your App Ads Setup
With deep linking you send people directly to information they are interested in when they open your app for the first time. You can use deep links in any ad format: Mobile App Install Ads and Mobile App Engagement Ads.
Why this is Helping your Ads
By using deep linking for your app ads, you are removing extra steps between clicking the ad and getting to content that interested them (for example the the vacation offer) provides a more seamless customer experience. Without deep links, people will have to search for the content they are looking for manually and you risk them dropping off.
- How it works
- Step-by-Step Guide
How it works
- Your ad will show personalized content, in our example a vacation to San Francisco.
- People will download your app.
- Via a deep link people will come back to their point of inspiration, the vacation to San Francisco.
As people will start in a place which is related to their moment when the tapped the ad, they are more likely to directly engage with the content of your app.
Step-by-Step Guide
1. iOS & Android Setup
2. Facebook SDK
3. Facebook App Settings
4. Deferred Deep Linking
5. Verify Deep Link Setup
6. Add Deep Link to your Ad
1. iOS & Android Setup
iOS
You can easily handle deep links using the Bolts Framework. You can learn more about the Framework on Github: https://github.com/BoltsFramework/Bolts-iOS.
If you do not want to use the Bolts Framework, follow for example one of these tutorials:
- Objective-C: Custom URL Schemes on idev101.com
- Deep Linking in iOS on blog.originate.com
Android
Read the official tutorial Enabling Deep Links for App Content on android.com.
2. Facebook SDK
Follow our step-by-step guide Facebook SDK Setup. The guide will show you how to:
- Get a Facebook App ID
- Add Facebook SDK to your app
- Enable Install Tracking
3. Facebook App Settings
Once you completed the initial Facebook SDK Setup you need to add deep linking information in your Facebook app settings.
iOS Settings
- URL Scheme Suffix: Add your URL scheme without
://
, e.g.mytravelapp
if your URL scheme ismytravelapp://
. - App Store ID: You can get your App Store ID for example from your App Store URL: https://itunes.apple.com/us/app/my-app/`APP_STORE_ID`.
Android Settings
- ClassName: Find the ClassName of the launch activity in the file
AndroidManifest.xml
. The class name should take the formcom.example.androidapp.MainActivity
.
iOS - Navigate to Dashboard > Settings > iOS
Android - Navigate to Dashboard > Settings > Android
4. Deferred Deep Linking (optional)
Deferred deep linking allows you to send people to a custom view after they installed your app via the app store.
When do You Need Deferred Deep Linking?
You must add deferred deep linking to an ad using 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.
Deferred Deep Linking with App Links
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:
iOS SDK
// Add Bolts.framework to your project (part of the FB SDK)
#import <Bolts/Bolts.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (launchOptions[UIApplicationLaunchOptionsURLKey] == nil) {
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
if (error) {
NSLog(@"Received error while fetching deferred app link %@", error);
}
if (url) {
[[UIApplication sharedApplication] openURL:url];
}
}];
}
return YES;
}
Android SDK
AppLinkData.fetchDeferredAppLinkData(this,
new AppLinkData.CompletionHandler() {
@Override
public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) {
// Process app link data
}
}
);
Class Reference: iOS > FBSDKAppLinkUtility | Android > AppLinkData
5. Verify Deep Link Setup
You can verify your Facebook SDK and deep link setup within our App Ads Helper in the tools & support section. We recommend to verify your setup before you start running deep link ads.
6. Add Deep Link to your Ad
Follow our guide Creating App Ads. When creating your ad pay attention to the following settings:
- Target Platform: In "Who do you want your ads to reach?" use:
- iOS:
iOS only
for the setting platform. - Android:
Android only
for the setting platform. - Add Deep Link: In "What text and links do you want to use?" add your deep link, e.g.
mytravelapp://tripId=SF
as shown in the screenshot below.
Screenshot: Add Deep Link to your Ad
Next Steps
Create Ad How to Create an Engagement Ad Install and In-App Conversion Tracking