Deferred Deep Linking
SDK Version Selection
Choose your SDK version below:
- Apptrove SDK → Recommended for all projects (Latest: v2.x.x)
- Trackier SDK → Will be deprecated in August 2026 (v1.x.xx)
Use the tabs below to view deferred deep linking code for your chosen SDK.
Deferred deep linking happens when a user clicks a Trackier URL but doesn't have your app installed. The URL redirects to the App Store, and when the user installs and opens the app, the SDK retrieves the deep link data.
note
To enable deferred deep link functionality on iOS, you need to call the subscribeAttributionlink() method after initialization. This allows our server to send the attributed data parameters to the app.
Prerequisites
- iOS 10.0 or later
- Apptrove SDK integrated and initialized
- Associated Domains configured in Xcode
Implementation
1. Configure Associated Domains
In Xcode, add your UniLink subdomain to Associated Domains:
- Go to Capabilities tab
- Turn on Associated Domains
- Add:
applinks:yourbrand.unilink.me
2. Initialize SDK with Deep Link Listener
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating August 2026)
- Swift
- Objective-C
AppDelegate.swift
import UIKit
import ApptroveSDK // or import apptrove_ios_sdk
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, DeepLinkListener {
func onDeepLinking(result: DeepLink) -> Void {
print("Deep link data: \(result.getUrlParams())")
// Handle your deep link navigation here
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = AppTroveSDKConfig(
appToken: "xxxx-xx-xxx-xxx",
env: AppTroveSDKConfig.ENV_DEVELOPMENT
)
config.setDeeplinkListerner(listener: self)
AppTroveSDK.initialize(config: config)
// Subscribe to attribution link for deferred deep links
if #available(iOS 13.0.0, *) {
AppTroveSDK.subscribeAttributionlink()
}
return true
}
}
AppDelegate.m
#import "AppDelegate.h"
@import apptrove_ios_sdk;
@interface AppDelegate () <DeepLinkListener>
@end
@implementation AppDelegate
- (void)onDeepLinkingWithResult:(DeepLink *)result {
NSLog(@"Deep link data: %@ | DLV: %@", [result getUrl], [result getDlv]);
// Handle your deep link navigation here
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
AppTroveSDKConfig *config =
[[AppTroveSDKConfig alloc] initWithAppToken:@"xxxx-xx-xxx-xxx"
env:AppTroveSDKConfig.ENV_DEVELOPMENT];
[config setDeeplinkListernerWithListener:self];
[AppTroveSDK initializeWithConfig:config];
// Subscribe to attribution link for deferred deep links
if (@available(iOS 13.0, *)) {
[AppTroveSDK subscribeAttributionlink];
}
return YES;
}
@end
AppDelegate.swift
import UIKit
import TrackierSDK // or import trackier_ios_sdk
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, DeepLinkListener {
func onDeepLinking(result: DeepLink) -> Void {
print("Deep link data: \(result.getUrlParams())")
// Handle your deep link navigation here
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = TrackierSDKConfig(
appToken: "xxxx-xx-xxx-xxx",
env: TrackierSDKConfig.ENV_DEVELOPMENT
)
config.setDeeplinkListerner(listener: self)
TrackierSDK.initialize(config: config)
// Subscribe to attribution link for deferred deep links
if #available(iOS 13.0.0, *) {
TrackierSDK.subscribeAttributionlink()
}
return true
}
}
3. Access Deep Link Parameters
- ✓ Apptrove SDK (Recommended)
- Swift
- Objective-C
func onDeepLinking(result: DeepLink) -> Void {
print("URL: \(result.getUrl())")
print("SDK Params: \(result.getSDKParams())")
print("Ad: \(result.getAd())")
print("Ad ID: \(result.getAdId())")
print("Campaign: \(result.getCamp())")
print("Campaign ID: \(result.getCampId())")
print("Ad Set: \(result.getAdSet())")
print("Ad Set ID: \(result.getAdSetId())")
print("Channel: \(result.getChannel())")
print("Click ID: \(result.getClickId())")
print("DLV: \(result.getDlv())")
print("PID: \(result.getPid())")
print("Message: \(result.getMessage())")
print("P1: \(result.getP1())")
print("P2: \(result.getP2())")
print("P3: \(result.getP3())")
print("P4: \(result.getP4())")
print("P5: \(result.getP5())")
}
- (void)onDeepLinkingWithResult:(DeepLink *)result {
NSLog(@"URL: %@", [result getUrl]);
NSLog(@"SDK Params: %@", [result getSDKParams]);
NSLog(@"Ad: %@", [result getAd]);
NSLog(@"Ad ID: %@", [result getAdId]);
NSLog(@"Campaign: %@", [result getCamp]);
NSLog(@"Campaign ID: %@", [result getCampId]);
NSLog(@"Ad Set: %@", [result getAdSet]);
NSLog(@"Ad Set ID: %@", [result getAdSetId]);
NSLog(@"Channel: %@", [result getChannel]);
NSLog(@"Click ID: %@", [result getClickId]);
NSLog(@"DLV: %@", [result getDlv]);
NSLog(@"PID: %@", [result getPid]);
NSLog(@"Message: %@", [result getMessage]);
NSLog(@"P1: %@", [result getP1]);
NSLog(@"P2: %@", [result getP2]);
NSLog(@"P3: %@", [result getP3]);
NSLog(@"P4: %@", [result getP4]);
NSLog(@"P5: %@", [result getP5]);
}
Testing
Test Deferred Deep Link
- Prepare Test URL: Get a valid deferred deep link from Apptrove panel
- Click the Link: Open the link in Safari - it should redirect to App Store
- Install App: Install the app (via TestFlight or direct installation)
- Launch App: Open the app - the SDK should process the deferred deep link
- Verify: Check that
onDeepLinkingis called with the correct parameters
Example Test URL:
https://yourdomain.u9ilnk.me/d/Af2xeLPI77?pid=Ron+Media+Source&cost_value=0&cost_currency=GBP&lbw=1d&camp=Ron+Referral+Test&dlv=RonTestClass&p2=param_2_value&sdk_param=sdk_param_value
Common Issues
| Issue | Solution |
|---|---|
| No App Store redirect | Check Store Redirect in Trackier Panel |
| Deferred link not working | Call subscribeAttributionlink() after SDK initialization |
| Missing parameters | Verify URL includes required parameters |
For further assistance, contact Apptrove support at support@apptrove.com.