Skip to main content

Deeplink

Overview

We support deep linking on iOS and Android platforms.

If you are using Adtrace tracker URLs with deep linking enabled, it is possible to receive information about the deeplink URL and its content. Users may interact with the URL regardless of whether they have your app installed on their device (standard deep linking) or not (deferred deep linking).

With standard deep linking, the Android platform lets you receive deeplink content; however, Android does not automatically support deferred deep linking. To access deferred deeplink content, you can use the Adtrace SDK.

Set up deeplink handling in your app on a native level within your generated Xcode project (for iOS) and Android Studio / Eclipse project (for Android).

Standard scenario

Information about standard deep links cannot be delivered to you in Unity C# code. Once you enable your app to handle deep linking, you’ll get information about the deeplink on a native level. For more information, here’s how to enable deep linking for Android and iOS apps.

Deferred scenario

In order to get content information about the deferred deeplink, set a callback method on the AdTraceConfig object. This will receive one string parameter where the content of the URL is delivered. Set this method on the config object by calling the method setDeferredDeeplinkDelegate:

// ...

private void DeferredDeeplinkCallback(string deeplinkURL) {
Debug.Log("Deeplink URL: " + deeplinkURL);

// ...
}

AdTraceConfig adtraceConfig = new AdTraceConfig("{YourAppToken}", "{YourEnvironment}");

adtraceConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback);

AdTrace.start(adtraceConfig);

With deferred deep linking, there is an additional setting you can set on the AdTraceConfig object. Once the Adtrace SDK gets the deferred deeplink information, you can choose whether our SDK should open the URL or not. You can set this option by calling the setLaunchDeferredDeeplink method on the config object:

// ...

private void DeferredDeeplinkCallback(string deeplinkURL) {
Debug.Log ("Deeplink URL: " + deeplinkURL);

// ...
}

AdTraceConfig adtraceConfig = new AdTraceConfig("{YourAppToken}", "{YourEnvironment}");

adtraceConfig.setLaunchDeferredDeeplink(true);
adtraceConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback);

AdTrace.start(adtraceConfig);

If nothing is set, the Adtrace SDK will always try to launch the URL by default.

To enable your apps to support deep linking, set up schemes for each supported platform.

Handling in Android apps

To set up deeplink handling in an Android app on a native level, follow the instructions in our official Android SDK.

This should be done in native Android Studio / Eclipse project.

Handling in iOS apps

This should be done in native Xcode project.

To set up deeplink handling in an iOS app on a native level, please use a native Xcode project and follow the instructions in our official iOS SDK.