Deferred Deep Linking
Use the tabs below for SDK-specific deferred deep-link setup.
SDK-Specific Quick Setup
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating August 2026)
import { AppTroveSDK, AppTroveConfig } from 'apptrove-expo-sdk';
const appTroveConfig = new AppTroveConfig('YOUR_SDK_KEY', AppTroveConfig.EnvironmentProduction);
appTroveConfig.setDeferredDeeplinkCallbackListener((uri) => {
console.log('Deferred Deep Link URL:', uri);
});
AppTroveSDK.initialize(appTroveConfig);
AppTroveSDK.subscribeDeeplink();
Starting from v1.6.79, the Trackier SDK callback returns a structured TrackierDeepLink object instead of a plain URL string.
import { TrackierSDK, TrackierConfig, TrackierDeepLink } from 'trackier-expo-sdk';
// 1. Initialize Config
const trackierConfig = new TrackierConfig('YOUR_SDK_KEY', TrackierConfig.EnvironmentProduction);
// 2. Set up deferred deep link listener BEFORE SDK initialization
trackierConfig.setDeferredDeeplinkCallbackListener((deepLink: TrackierDeepLink) => {
console.log('Deferred deep link received');
console.log('URL:', deepLink.url);
console.log('Is Deferred:', deepLink.isDeferred);
console.log('Value:', deepLink.deepLinkValue);
console.log('Partner ID:', deepLink.partnerId);
console.log('Site ID:', deepLink.siteId);
console.log('Campaign:', deepLink.campaign);
console.log('Campaign ID:', deepLink.campaignId);
console.log('Ad:', deepLink.ad);
console.log('Ad ID:', deepLink.adId);
console.log('Channel:', deepLink.channel);
console.log('Click ID:', deepLink.clickId);
console.log('P1-P5:', deepLink.p1, deepLink.p2, deepLink.p3, deepLink.p4, deepLink.p5);
if (deepLink.sdkParams) {
console.log('SDK Params:', JSON.stringify(deepLink.sdkParams));
}
});
// 3. Initialize SDK
TrackierSDK.initialize(trackierConfig);
// 4. Subscribe (iOS only)
TrackierSDK.subscribeDeeplink();
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.
For iOS Only: To enable deferred deep link functionality on iOS, you need to call the subscribeDeeplink() 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
1. Initialize SDK with Deferred Deep Link Callback
- ✓ Apptrove SDK (Recommended)
- Trackier SDK (Deprecating August 2026)
import React, { useEffect } from 'react';
import { Platform } from 'react-native';
import { AppTroveSDK, AppTroveConfig } from 'apptrove-expo-sdk';
const App = () => {
useEffect(() => {
initializeSDK();
}, []);
const initializeSDK = () => {
const appTroveConfig = new AppTroveConfig('YOUR_SDK_KEY', 'production');
// Set deferred deep link callback
appTroveConfig.setDeferredDeeplinkCallbackListener((uri) => {
console.log('Deferred Deep Link URL:', uri);
// Handle your deep link navigation here
handleDeepLink(uri);
});
AppTroveSDK.initialize(appTroveConfig);
// Subscribe to attribution link for deferred deep links (iOS only)
if (Platform.OS === 'ios') {
AppTroveSDK.subscribeDeeplink();
}
};
const handleDeepLink = (uri) => {
// Parse the deep link and navigate to appropriate screen
console.log('Handling deep link:', uri);
// Example: navigation.navigate('Product', { id: productId });
};
return (
// Your app components
);
};
export default App;
import React, { useEffect } from 'react';
import { Platform } from 'react-native';
import { TrackierSDK, TrackierConfig, TrackierDeepLink } from 'trackier-expo-sdk';
const App = () => {
useEffect(() => {
initializeSDK();
}, []);
const initializeSDK = () => {
// 1. Initialize Config
const trackierConfig = new TrackierConfig('YOUR_SDK_KEY', 'production');
// 2. Set up deferred deep link listener BEFORE SDK initialization
trackierConfig.setDeferredDeeplinkCallbackListener((deepLink: TrackierDeepLink) => {
console.log('Deferred Deep Link received');
console.log('URL:', deepLink.url);
console.log('Is Deferred:', deepLink.isDeferred);
console.log('Deep Link Value:', deepLink.deepLinkValue);
console.log('Partner ID:', deepLink.partnerId);
console.log('Site ID:', deepLink.siteId);
console.log('Sub-Site ID:', deepLink.subSiteId);
console.log('Campaign:', deepLink.campaign);
console.log('Campaign ID:', deepLink.campaignId);
console.log('Ad:', deepLink.ad);
console.log('Ad ID:', deepLink.adId);
console.log('AdSet:', deepLink.adSet);
console.log('AdSet ID:', deepLink.adSetId);
console.log('Channel:', deepLink.channel);
console.log('Click ID:', deepLink.clickId);
console.log('Message:', deepLink.message);
console.log('P1-P5:', deepLink.p1, deepLink.p2, deepLink.p3, deepLink.p4, deepLink.p5);
if (deepLink.sdkParams) {
console.log('SDK Params:', JSON.stringify(deepLink.sdkParams));
}
handleDeepLink(deepLink);
});
// 3. Initialize SDK
TrackierSDK.initialize(trackierConfig);
// 4. Subscribe to attribution link (iOS only)
if (Platform.OS === 'ios') {
TrackierSDK.subscribeDeeplink();
}
};
const handleDeepLink = (deepLink: TrackierDeepLink) => {
console.log('Processing deep link:', deepLink.url);
if (deepLink.deepLinkValue) {
// Handle navigation based on value
}
};
return (
// Your app components
);
};
export default App;
If you are upgrading from v1.6.78 or earlier, the callback previously returned a plain URL string. In v1.6.79+, it returns a structured TrackierDeepLink object. Update your callback type and logic to directly access properties instead of parsing the URL manually.
Testing
Android Testing
- Prepare APK: Build APK with SDK integration
- Click Link: Open test URL in browser - redirects to Play Store
- Install APK: Install APK manually (not from Play Store)
- Launch App: Open app - deferred deep link should be processed
iOS Testing
- Prepare IPA: Build IPA with SDK integration
- Click Link: Open test URL in Safari - redirects to App Store
- Install App: Install via TestFlight or direct installation
- 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
| Issue | Solution |
|---|---|
| No app store redirect | Check Store Redirect in Apptrove Panel |
| Deep link not processed | Ensure subscribeDeeplink() is called after SDK initialization |
| Missing parameters | Verify URL includes required parameters |
For further assistance, contact Apptrove support at support@apptrove.com.