dynamic_link_image Deep Linking

Last updated: March 3rd, 2020

How does LDL works?

You need to create a Deep link using a REST API, by forming a URL by adding Deep Link parameters to a domain specific to your app. These parameters specify the link you want to open depending upon the platform.

When the user clicks on your Deep Links, if your app is not installed, the user is first sent to the Play Store or the App Store(if the redirection url is already specified), and after installation when your app opens. You can handle the deep link and user can view the relevant page of your app.

Steps to implement LDL

Below are the steps to implement Lnkiy Deep Linking (LDL)

1. Set up your project

You need to setup your project at Lnkiy Admin platform by giving some basic details like, project name, package name and by selecting proper sub domain for your app.

Sign in your account

2. Create Deep link

You can create deep link by using the REST API.

3. Verify and Handle deep link

When user clicks on the Deep link, your app gets open, there you need to verify and fetch the destination link using REST API. After getting that destination link, redirect the user accordingly.

4. Track and Analyze Deep Link

Track and analyze the performance of your Deep link in the admin dashboard.

Use of Deep Link

  • Convert Web user to App user:
  • Before Deep linking, if a web user install app by clicking on the installation link, After app gets install they will have to re-navigate to the page they were there in website. But if we use Deep link, you can manage that the user navigate directly to the same page where they left on the web, as the app gets install.

  • Digital marketing and social campaigns:
  • Using Deep Linking you can send the promotional offers that work on any platform like Android and iOS. User can redeem your offers whether they have app installed or not in there device.

  • User-to-user sharing:
  • Suppose you want to share a product with you friend, so deep link make it possible to open exactly the same content no matter what platform your friend use such as Android or IOS.

Create Deep Link

You can create Deep Link using Rest API.

This is the preferred way to dynamically create links on platforms like Android and IOS. The Analytics REST API can be used to track the performance in the dashboard.

Next Step

After you create Deep Links, you need to set up your app to receive Deep Links and send users to the right place in your app after a user opens Deep Link.

Create Deep Links on Android

You can create dynamic Deep Links with the Lnkiy Deep Linking REST API. This API accepts an original destination URL of the app in order to route the user to the expected content, and returns URLs like following examples:.

Deep Link Sample:

http://example.alnk.in/qdtsr

Set up LDL Project and follow these steps to configure one or more mobile apps:

Before you can create Deep Links in your Android app, you must setup the project and select your project sub domain. If your app is set up to receive Deep Links, you have already completed these steps and you can skip this section.

1. If you haven't already, add your Android project.

2. When you register your app, specify your project name, package name and sub domain.

Lets see how to create a Deep Links using REST API

Request:

http://api.lnkiy.com/url/deeplink/createlink

Headers:

Accept: application/json
Content-Type: application/json

Body:


{
	"destinationLink":"http://www.studyhook.com/coaching-details/3/TryCatch-Classes",
	"projectKey":"34XXXXXXXXXXXXXXXXXXXXXfs3dh4jkr7ysg"
	"appStoreLink":"https://play.google.com/store/apps/details?id=xxx.xx.xxxx"
}
Different Parameters and its use
Parameters Description Required
projectKey It is the unique key of your project. If you don't have, setup your project and generate key Yes
destinationLink It will be the original destination URL of the app in order to route the user to the expected content. Yes
appStoreLink It will be your app google play store link or your app download link. Yes
linkTitle This wil give the title to your url. No
expiryDate After this expiry date your deep link will no longer be valid. No
Response:

									
{
    "responseCode": "200",
    "responseStatus": "SUCCESS",
    "responseMessage": "Deeplink  successfully created",
    "result": {
        "createdOn": "31-12-2019 06:18:12",
        "status": "Active",
        "destinationLink": "http://www.studyhook.com/coaching-details/3/TryCatch-Classes",
        "dynamicDeepLink": "http://example.alnk.in/ILd7rdP7f",
        "linkTitle": null,
        "expiryDate": null
    }
}
									

Create Deep Links on IOS

You can create deep link by using the REST API.

Receive Deep Link

Receive Deep Links on Android

To receive deep link in your Android App first you need to do the needful

Prerequisite

Follow these steps to configure one or more mobile apps:

1. If you haven't already, add your Android project.

2. When you register your app, specify your project name, package name and sub domain.

If registered, Add an intent filter for deep links:

As with plain deep links, you must add a new intent filter to the activity that handles deep links for your app. The intent filter should catch deep links of your domain, since the Deep Link will redirect to your domain if your app is installed. This is required for your app to receive the Deep Link data after it is installed/updated from the Play Store and one taps on Continue button. In AndroidManifest.xml:

Code:

<intent-filter>
   
<action android:name="android.intent.action.VIEW"/>
   
<category android:name="android.intent.category.DEFAULT"/>
   
<category android:name="android.intent.category.BROWSABLE"/>
   
<data
       
android:host="example.alnk.in"
       
android:scheme="https"/>
</intent-filter>

When users open a Deep Link with a dynamic link to the scheme and host you specify, your app will start the activity with this intent filter to handle the link.

Handle deep links

To receive the destination link, call this API:

Request:

http://api.lnkiy.com/url/deeplink/searchlink

Headers:

Accept: application/json
Content-Type: application/json

Body:

									
{
	"dynamicDeepLink":"ILd7rdP7f",
	"projectKey":"34XXXXXXXXXXXXXXXXXXXXXfs3dh4jkr7ysg"
}
									

Send only the value after "/"

Your Link- http://example.alnk.in/ILd7rdP7f
Example : "deepLink":"ILd7rdP7f"

Different Parameters and its use
Parameters Description Required
projectKey It is the unique key of your project. If you don't have, setup your project and generate key. Yes
dynamicDeepLink It will be the deep Link created by the user using REST API. Yes
Response:

									
{
    "responseCode": "200",
    "responseStatus": "SUCCESS",
    "responseMessage": "Short link successfully retrived",
    "result": {
        "createdOn": "27-12-2019 08:14:09",
        "status": "Active",
        "destinationLink": "http://www.studyhook.com/coaching-details/3/TryCatch-Classes",
        "dynamicDeepLink": "http://example.alnk.in/ILd7rdP7f",
        "linkTitle": null,
        "expiryDate": null
    }
}
									

Receive Deep Links on IOS

You can create deep link by using the REST API.

Error Codes

Whenever a requested resource is not available or an API call fails for following reason, a JSON error is returned. Errors always come with an responseCode and a responseMessage.

Example Error: The following error is returned, when short link you are trying to search is not available.


									
{
    "responseCode": "401",
    "responseStatus": "WARRING",
    "responseMessage": "Short Link Not Found",
    "result": null
}
									

Other Errors

Response Code Response Status Description
401 WARNING When your auth key is invalid
403 WARNING When Short link is not found
500 ERROR Something went wrong, Please try again