[L3882] Introduction to Universal Links - Adobe-Marketing-Cloud/aml-summit-lab GitHub Wiki
Introduction to Universal Links
Objective
Learn how to optimize your users' experience between your mobile website and your app by using Universal Links.
Pre-requisites
In order to configure and test Universal Links in Adobe Mobile Services, you need to have access to a paid Apple Developer account. Due to this limitation, we are forced to shrink the scope of this lab exercise. We will show how to create Universal Links in the Adobe Mobile Services UI, and speak at a high-level to the setup required for using Universal Links in your app.
Why use Universal Links?
Universal Links can provide many useful benefits (list provided by documentation from Apple's website):
-
Unique. Unlike custom URL schemes, universal links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website.
-
Secure. When users install your app, iOS checks a file that you’ve uploaded to your web server to make sure that your website allows your app to open URLs on its behalf. Only you can create and upload this file, so the association of your website with your app is secure.
-
Flexible. Universal links work even when your app is not installed. When your app isn’t installed, tapping a link to your website opens the content in Safari, as users expect.
-
Simple. One URL works for both your website and your app.
-
Private. Other apps can communicate with your app without needing to know whether your app is installed.
Within the Adobe Mobile ecosystem, Universal Links provide an alternative to using interstitials. Rather than requiring your users to decide whether they want to open a link in your app or go to your website, you now get to make the decision for them.
Implementation steps
Creating a Universal Link in Adobe Mobile Services
- Navigate to the Manage App Settings page.
- In the App Store Apps section, verify you have an App Store App linked.
-
Scroll down to the Universal Links and App Links Options section. Make sure Universal Links (iOS) is selected. Select your linked app from step 2, and enter in a fake App ID.
198DA3713B.com.fakeCompany.fakeAppName
- Note - this App ID is unique per Apple Development Team and App. It is a combination of your Apple Developer Account Team ID and your app's Bundle ID. You can learn more your App ID by clicking the What's my app id? link in Mobile Services.
-
Hit the Save or Update button (this will be different depending on whether or not an App ID for Universal Links already exists).
-
Navigate to Acquisition -> Marketing Link Builder.
- Click the Create New button.
- Enter in values for the Marketing Link Name and Unique Tracking Code fields.
- Ensure that under the Marketing Link Options section, Use Universal Links or App Links is selected.
- Click the Next button at the bottom of the page.
- Click the Square on the far right of the screen to Choose a Destination Type.
- Select Web Link.
- Choose your existing Web Link from the list and hit the Save button.
- Hit the Save button to finish creating your Universal Link.
- On the Marketing Links page, find the row for the new Universal Link you just created. Click Copy under the Link column.
- Click the Copy Link button. The resulting URL will have a prefix that looks similar to this:
https://58a4c3f69375ff58dc59dcfd.c00.adobe.com/. This is a special endpoint that we will need to use later when configuring our app to handle Universal Links.
- Open a new tab in your Chrome browser, and paste the link. Hit enter. Because your computer does not have this app installed, you will be taken to the Web Link.
If you had an app in the App Store that matched the AppID we used in step 3 above (198DA3713B.com.fakeCompany.fakeAppName), clicking on this link from a mobile device would have a different outcome. If the device has your app installed, the link will open your app. If the device does not have your app installed, the link will open the Web Link, similar to the experience you saw in the Chrome browser on your computer.
- Optional - When creating your Universal Link in Adobe Mobile Services, you have the option of adding in a Custom Path. If you want to provide deep link functionality, navigating users who click on this link to a specific page in your app, you can provide a Custom Path. Handling Custom Paths and making app navigation decisions requires configuration in your iOS app.
Enabling your iOS app for Universal Links
The following part of this lab exercise requires a paid Apple Developer account which is unavailable on the lab machines. The following steps are shown for informational purposes only, and need not be completed by lab attendees.
- In Xcode, select the SummitMobileLab project.
- Select the SummitMobileLab target.
- Select the Capabilities tab.
- Scroll down to Associated Domains and toggle it on.
- Add an entry in the Domains list for our Universal link prefix we made in the Mobile Services UI.
Related Documentation
Learn more about Tracking Deep Links in the Adobe SDK or more about Universal Links in Apple's documentation on Universal Links.