Skip to main content

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 (Latest legacy: v1.x.xx)

Use the tabs below for SDK-specific snippets.

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

For iOS Only: 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. For Android, deferred deep linking works automatically without this call.

Implementation

app.component.ts
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { AppTroveCordovaPlugin, AppTroveConfig, AppTroveEnvironment } from 'com.apptrove.cordova_sdk/ionic-native/apptrove/ngx';

@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss'],
})
export class AppComponent {
constructor(
private platform: Platform,
private apptroveCordovaPlugin: AppTroveCordovaPlugin
) {
this.initializeApp();
}

async initializeApp() {
await this.platform.ready();
await this.initializeAppTroveSDK();
}

async initializeAppTroveSDK() {
try {
const appTroveConfig = new AppTroveConfig(
'YOUR_SDK_KEY',
AppTroveEnvironment.Production
);

// 1. Set up deferred deep link listener BEFORE SDK initialization
this.apptroveCordovaPlugin.setDeferredDeeplinkCallbackListener().subscribe({
next: (uri: string) => {
console.log('Deferred Deep Link URL:', uri);
this.handleDeepLink(uri);
},
error: (error) => {
console.error('Deferred deep link listener error:', error);
}
});

// 2. Initialize SDK
await this.apptroveCordovaPlugin.initializeSDK(appTroveConfig);
console.log('AppTrove SDK initialized successfully');

// 3. Subscribe to attribution link for deferred deep links (iOS only)
if (this.platform.is('ios')) {
this.apptroveCordovaPlugin.subscribeAttributionlink();
}
} catch (error) {
console.error('Error initializing AppTrove SDK:', error);
}
}

handleDeepLink(uri: string) {
// Parse the deep link and navigate to appropriate screen
console.log('Handling deep link:', uri);
// Example: this.router.navigate(['/product', productId]);
}
}

Testing

Android Testing

  1. Prepare APK: Build APK with SDK integration
  2. Click Link: Open test URL in browser - redirects to Play Store
  3. Install APK: Install APK manually (not from Play Store)
  4. Launch App: Open app - deferred deep link should be processed

iOS Testing

  1. Prepare IPA: Build IPA with SDK integration
  2. Click Link: Open test URL in Safari - redirects to App Store
  3. Install App: Install via TestFlight or direct installation
  4. Launch App: Open app - deferred deep link should be processed

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 Apptrove Panel
Deep link not processedEnsure subscribeAttributionlink() is called after SDK initialization
Callback not triggeredEnsure listener is configured before initializeSDK()
Missing parametersVerify URL includes required parameters

Trackier SDK Specific Issues:

IssueSolution
Callback returns string instead of objectUpdate SDK to v1.6.81+ — older versions return plain URL string

For further assistance, contact Apptrove support at support@apptrove.com.