Skip to main content

Deferred Deep Linking

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
AppDelegate.swift
import UIKit
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
}

}
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())")

}

Testing

  1. Prepare Test URL: Get a valid deferred deep link from AppTrove panel
  2. Click the Link: Open the link in Safari - it should redirect to App Store
  3. Install App: Install the app (via TestFlight or direct installation)
  4. Launch App: Open the app - the SDK should process the deferred deep link
  5. Verify: Check that onDeepLinking is 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

IssueSolution
No App Store redirectCheck Store Redirect in Trackier Panel
Deferred link not workingCall subscribeAttributionlink() after SDK initialization
Missing parametersVerify URL includes required parameters

For further assistance, contact Trackier support at support@trackier.com.