Overview and Requirements
Deep links are a great addition to your mobile marketing toolkit. Deep links allow you to send a user directly to a specific section, or page, of your app. These are great for if you’ve got a Call to Action that needs to take your users to a sale or want the push message to send them to a certain account page.
You’ll need to be on any SDK version above 4—any version previous, you’ll want to check out our docs on Key/Value pairs to manually parse out deep links from within your app’s code.
For those above SDK 4, as long as you have the custom URL scheme registered, the SDK will automatically tag the opened event and launch the deep link.
URI Schemes for Apps
Mobile deep links function just like website URLs. When you type a URL link into a web browser, you’re providing the browser with a string of text which the browser interprets. If you type https://support.localytics.com into the browser, it recognizes the URL as valid and loads the Localytics Help site.
Just like a URL is an address for a website. A URI is the address for an app on a mobile device. A deep link points the user to a specific part of your app. For example, in a deep link like temps://showZipcode?90210 the first part temps:// is called the URI scheme and must be registered by your app and must be a unique value. Just like your website might be https://temps.com, and you’ve registered this custom domain exclusively for your company.
The URI scheme must be unique so that your device knows exactly which app to open when it sees a specific URI scheme.
How Deep Links Work
Setting up a URI scheme enables the device to know which app to open, but deep links allow you to do more—to direct an end user to a particular destination with your app.
In the example above (temps://showZipcode?90210), the app should have logic that when it sees showZipcode and the numerical value 90210, the app generates a view of the weather for the zipcode 90210. Most apps tend to handle deep links the same way—so your deep link should look something like myapp://destinationPage.
For more, see documentation about using URL schemes on iOS, using Universal Links with Localytics and enabling deep linking on Android, or view Mobile Deep linking Basics from our partner Branch.io.
Testing Deep Links
To test if your deep links work (independent of Localytics), you can type the deep link into a mobile browser. As long as you have the app downloaded, your phone will recognize the URI for your app, and open it. If your deep link is correct, your app should immediately open to the page linked.
If your user doesn’t have the app downloaded, they’ll be taken to the app store when your URI is called by the device.
If you’re running into an issue, check with your development team to make sure you’ve got the correct URI and deep link scheme.