Guide to Deep Linking

2017-09-04 10:50:15 UTC

Deep Linking

 The feature “Deep Linking” allows you to link through your website, push notifications, or your newsletter into the app on Android or iOS. This is an opportunity for you to drive potential new readers into the app, but while the feature sounds simple it has a lot of limitations and requires a lot of work on your side to get the most out of it. The instructions below will provide you with the information needed in order to start using the Deep Linking feature.

 The creation of Deep Links requires knowledge of URL structure and web development, so we recommend that Deep Links to be implemented by a web developer or similar within your organization.

Disclaimer 

Deep Linking has a lot of restrictions, not because it's difficult to improve on the feature, but because it's impossible. 

  • The links are structured differently on the different devices, meaning that an Android link will look vastly different than an iOS link.
  • It is not a "smart" feature, meaning the links point to a destination, but the link doesn't know anything about the user's device. This means that if you are on an Android device, but click on an iOS link, the device doesn't recognize the destination and will show an error. 
  • Apple and Google implement security in different ways. Apple doesn't allow a webpage to know if a specific app is installed or not. This means that a link on an Android device to an Android app can open either the app or Google Play Store if the app is not installed. This is not possible on iOS (unless you use a Smart Banner, see the chapter further down this article).  
  • Most email apps and programs have a restriction to only allow secure types of links. This means that Deep Links into apps aren't allowed. We have ways to get around that, but that also requires some work. 

How to

Deep Linking is a custom link designed depending on platform and what it should link to. Here is an overview and then a more detailed description below. The process can be simpler depending on how you wish to use Deep Linking. 

  • Create Deep Links
    1. Android
    2. iOS (installed)
    3. iOS (not installed)
    4. Web
  • Restructure Link
  • Redirect page
  • Smart Banner
  • Test
  • Publish

Create Deep Links:

You need 4 different links to reach all relevant devices.

One link for web, pointing to your login page.

One link for Android. When the link is activated from an Android device, the script will figure out whether or not the app is installed on the reader’s device. If the app is installed, the app will open. If the app is not installed, Google Play will open with the opportunity to download the app.

Two links on iOS, because we are not allowed to ask the device, if a certain app is installed. This means that the user must actively choose between 2 links, to open the app or open App Store. It is possible to merge these 2 links in a Smart Banner (see Smart Banner).

 

1 - Android:

Specific parameters are required depending on usage:

[PREFIX] – Prefix name of your app, and will be provided to you by Visiolink.

[PACKAGE] – APP ID. Will be provided to you by Visiolink.

[USER] – Username of user if you intend to log in with credentials. 

[PASS] - Password of user if you intend to log in with credentials.

[DATE] – Date of issue you want to link to. If none specified, then latest issue is shown. Format: YYYY-MM-DD (example: 2016-09-28)

[PAGE] – Page of issue you want to link to. If none specified, then front page is shown. Format: Integer

[PREFIX_TITLE] – Prefix for specific title in your app. If none specified, then the most recently opened is shown. Visiolink can provide you with a list of correct prefixes for your titles.

 

 

To open the app

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader;end

 

To open the app and login with credentials

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];S.username=[USER];S.password=[PASS];end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader;S.username= test@visiolink.com;S.password=guest;end

 

To open the latest issue of your publication

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];S.argument=open;end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader; S.argument=open;end

 

To open the latest issue if more titles are in the app

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];S.customer=[PREFIX_TITLE];S.argument=open;end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader; S.customer=visiolink2; S.argument=open;end

 

To open a certain issue on a certain page

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];S.date=[DATE];S.page=[PAGE];S.argument=open;end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader;S.date=2016-10-13;S.page=8;S.argument=open;end

 

To open a certain issue on a certain page if more titles in the app

intent://reader/#Intent;scheme=[PREFIX];package=[PACKAGE];S.date=[DATE];S.page=[PAGE];S.customer=[PREFIX_TITLE];S.argument=open;end

Example:

intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader;S.date=2016-10-13;S.page=8; S.customer=visiolink2;S.argument=open;end

 

 

 

2 – iOS (installed):

Examples of links below. You need to fill out parameters unique for your app. Specific parameters are required depending on usage:

[URL] – URL scheme of your app. Will be provided to you by Visiolink.

[VOUCHER] - Voucher you want to login with.

[DATE] – Date of issue you want to link to. If none specified, then latest issue is shown. Format: YYYY-MM-DD (example: 2016-09-28)

[PAGE] – Page of issue you want to link to. If none specified, then front page is shown. Format: Integer

[PREFIX_TITLE] – Prefix for specific title in your app. If none specified, then the most recently opened is shown. Visiolink can provide you with a list of correct prefixes for your titles.

 

To open the app

[URL]://

Example

vlereader://

 

To open the latest issue of your publication

[URL]://open

Example

vlereader://open

  

To login with voucher and open the latest issue of your publication

[URL]://open?savedvoucher=[VOUCHER]

Example

vlereader://open?savedvoucher=guest

 

To open the latest issue if more titles in the app

[URL]://open?customer=[PREFIX_TITLE]

Example

vlereader://open?customer=visiolink2

 

To open a certain issue on a certain page

[URL]://open?date=[DATE]&page=[PAGE]

Example

vlereader://open?date=2016-10-13&page=8

 

Open a certain issue on a certain page if more titles in the app

[URL]://open?customer=[PREFIX_TITLE]&date=[DATE]&page=[PAGE]

example

vlereader://open?customer=visiolink2& date=2016-10-13&page=8

3 – iOS (not installed):

Link to your app in App Store.

On iOS, we are not allowed to ask the device, if a certain app is installed. This means that the user must actively choose to open the app or open App Store. Visiolink will provide you with the correct link.

4 – Web:

Link to your login page.

Deep linking is not supported on Web so there aren’t the same functionalities as on Android and iOS. You still need to guide your users in the right direction, so we recommend adding a link to your login page.

Restructure link:

Most e-mail clients don’t allow complex links, so Deep Linking directly from an e-mail to an app isn’t possible (or is dependent on which e-mail client the user is using). To get around that limitation, you need to restructure the link to appear like a normal http link.

We recommend using an online tool to restructure the links, example: tinyurl.com. It's easy to use and solve the problem. 

Example: intent://reader/#Intent;scheme=visiolink;package=dk.visiolink.areader; S.argument=open;end

Will get restructured to this: http://tinyurl.com/zsj743c

This isn’t necessary if you publish your Deep Link by other means than e-mail, like on your website or through push messages.

Redirect page:

If you don't want to use 3rd party tool, you can also create your own HTML redirect page that contain the Deep Link and link from e-mail to redirect page. This requires webhosting and a bit more work, but also create more possibilities with scripting. 

Here is an example of what a redirect page could look like:

  

A redirect page can also be smart and recognize what type of device you are on, redirecting you to a different link depending on your device. This will allow you to only show one link to the reader (the link to the redirect page) and the page will then forward the reader to the link that is relevant. 

Here is an example of what a smart redirect page could look like:

a9251eb7a1c748102c53282aaeed07a1.png

Smart Banner

You can merge the two links on iOS (1 to the app, 1 to App Store) through a Smart Banner. This is only available through the Safari browser on an iOS device. The Smart Banner will link to the app or to App Store depending on the app is installed or not. Though it's a banner at the top of the website and not really a link.

Read more here: https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

 

IMG_1035.PNG

Test

It’s important to test Deep Links before you publish them. When writing code manually, a single typing error means that the link won’t work. Test the redirect page as well.

It’s easy to test Deep Links by writing the URL in a browser on the specific device. Android links will only work on android and iOS links will only work on iOS. 

Publish

You can now publish your Deep Links. If you publish through mail, remember to link to the redirect page instead of the Deep Link directly. You can also publish through push messages by following the guide here.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments