Deeplink
Overview
Deep linking is supported on iOS and Android.
If you use Adtrace tracker URLs with deep linking enabled, you can receive the deeplink URL and its content — whether the app is already installed (standard) or not (deferred).
Set up deeplink handling on a native level in the generated Xcode project (iOS) and Android Studio project (Android).
Standard scenario
Standard deep links are still handled in the native Android or iOS project. For setup, see Android and iOS.
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
Do this in the native Xcode project. Follow the iOS SDK deeplink guide.