[L3882] Deferred Deep Linking - Adobe-Marketing-Cloud/aml-summit-lab GitHub Wiki
Deferred Deep Linking
Objective
Your deep links open your app and navigate to a specific page within your app. But what if a user clicks on your deep link but they don't have your app installed? With a deferred deep link, you combine the power of an acquisition link and a deep link into one. If the user already has your app installed, it works similar to a regular deep link. Otherwise, they will be directed to install your app from the App Store. If they launch the app after an install, the deep link will still trigger - taking them to the specific page in your app.
Pre-requisites
For this lab, you will need to have completed the labs on Acquisition Links and Deep Links.
Implementation steps
Create a deferred deep link in the Adobe Mobile Services UI
- Navigate to Acquisition > Marketing Link Builder.
- Click the Create New button.
- Enter a Marketing Link Name and a Unique Tracking Code. If necessary, select a Fallback URL.
- Hit the Next Button at the bottom of the page.
- Click the box on the far right to add a Destination.
- On the Choose a Destination Type dialog, click the App Store button.
- Select your iOS app on the Choose An App Store dialog. Check the box to Enable deferred deep linking. Hit the Next button.
- You should have a Deep Link already created for the Secret Lounge from the Creating Deep Links in Adobe Mobile Services exercise. Select your Secret Lounge deep link and hit the Save button.
- Save your Marketing Link by hitting the Save button at the top of the page.
- Click the Copy link under the Link column for your Deferred Deep Link you just made.
- Hit the Copy Link button to save the link to your clipboard.
Handle an install with a deferred deep link in the sample app
- Navigate to AppDelegate.m.
-
We have already registered for the AdobeDataCallback in the Accessing Acquisition Data in your App lab. Add the following block of code to handle Deferred Deep Link data:
else if (event == ADBMobileDataEventDeepLink) { [self application:application openURL:adobeData[ADBConfigKeyCallbackDeepLink] options:launchOptions]; }
- On the iOS simulator, delete the SummitMobileLab app.
- Open Safari in the simulator and paste in the deferred deep link. You will get a message in Safari indicating that the Simulator cannot open the App Store. You can ignore this message. If you click on this link on a device, it will redirect to your app in the App Store.
- In Xcode, run the app. This will install the app on your Simulator. Because there was a deferred deep link attached to your acquisition link, your first launch will open directly to the "Select a Destination..." page with the Secret Lounge location selected.
Related Documentation
Learn more about tracking deferred deep links or tracking third party deep links.