Skip to main content

SKAdNetwork Conversion

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.

This guide provides instructions for implementing SKAdNetwork postback conversion with the Apptrove Cordova SDK. SKAdNetwork postback conversion allows you to track user engagement and conversion events for iOS 14.5+ apps.

Overview

SKAdNetwork postback conversion is Apple's privacy-focused attribution system that allows you to track conversion events without compromising user privacy. This is essential for iOS 14.5+ apps that want to measure campaign effectiveness while respecting user privacy.

note

Important: SKAdNetwork postback conversion can be called from any part of your app to track user engagement and conversion events.

Prerequisites

  • iOS 14.5 or later
  • Apptrove Cordova SDK installed
  • Access to your app's Info.plist file

Implementation

Step 1: Configure Info.plist

Add the SKAdNetwork configuration to your Info.plist file:

<key>NSAdvertisingAttributionReportEndpoint</key>
<string>https://apptrovesn.com</string>
Enabling SKAdNetwork

After configuring Info.plist, you must explicitly enable SKAdNetwork in your SDK configuration before initialization:

appTroveConfig.enableSkanAttribution();

From Apptrove SDK v2.0.5 onwards, calling this method automatically handles the initial SKAdNetwork registration (conversion value 0).

Step 2: Integration with SDK

Initialize the SDK and then call postback conversion from any part of your app:

app.component.ts
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { AppTroveCordovaPlugin, AppTroveConfig, AppTroveEnvironment, AppTroveCoarseValue } 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();

// Initialize AppTrove SDK
await this.initializeAppTroveSDK();
}

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

// Enable SKAdNetwork Attribution (v2.0.5+)
appTroveConfig.enableSkanAttribution();

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

} catch (error) {
console.error('Error initializing AppTrove SDK:', error);
}
}
}
Disabling SKAdNetwork

SKAdNetwork attribution is disabled by default. If you need to explicitly disable it (e.g., depending on user consent or specific build configurations), you can use the disable method before initialization:

appTroveConfig.disableSkanAttribution();

Step 3: Track Conversion Events

Track conversion events throughout your app:

Usage Examples
if (this.platform.is('ios')) {

// Example 1: Basic conversion update (e.g., Registration)
try {
const result = await this.apptroveCordovaPlugin.updatePostbackConversion(10);
console.log('updatePostbackConversion success:', result);
} catch (error) {
console.error('SKAN updatePostbackConversion error:', error);
}

// Example 2: Update with coarse value and lock window (iOS 16.1+)
try {
const result = await this.apptroveCordovaPlugin.updatePostbackConversion(
20,
AppTroveCoarseValue.high,
true
);
console.log('updatePostbackConversion success:', result);
} catch (error) {
console.error('SKAN updatePostbackConversion error:', error);
}

// Example 3: Test conversion value with coarse value .low
try {
const result = await this.apptroveCordovaPlugin.updatePostbackConversion(
0,
AppTroveCoarseValue.low,
false
);
console.log('updatePostbackConversion success:', result);
} catch (error) {
console.error('SKAN updatePostbackConversion error:', error);
}

}
note

Best Practice: Call updatePostbackConversion immediately after the user action occurs to ensure accurate attribution tracking.

Conversion Value Guidelines

Value RangeDescriptionUse Case
0-9App EngagementApp opens, session starts
10-19User OnboardingRegistration, profile setup
20-29First ActionsFirst purchase, first subscription
30-39Regular UsageRepeat purchases, engagement
40-49High ValuePremium purchases, upgrades
50-63Premium/LoyaltyVIP status, loyalty program

Best Practices

  • Flexible Usage: updatePostbackConversion can be called from any part of your app
  • Meaningful Values: Use conversion values that represent user value (0-63)
  • Timing: Send conversion values immediately after the event occurs
  • Validation: Always validate conversion values before sending
  • Error Handling: Implement proper error handling for postback failures
  • iOS Only: SKAdNetwork is only available on iOS devices
  • Platform Check: Consider checking platform before calling on cross-platform apps

Troubleshooting

Postback Not Sent

  • Check if SKAdNetwork is available on the device (iOS 14.5+)
  • Verify the conversion value is within 0-63 range
  • Check console logs for error messages

Integration Issues

  • Verify the app token is correct
  • Ensure SDK is properly initialized
  • Check Info.plist configuration for postback endpoint

Debug Tips

// Check if platform is iOS
if (this.platform.is('ios')) {
console.log('iOS detected, SKAdNetwork available');
} else {
console.log('Not iOS, SKAdNetwork not available');
}

// Test conversion value
if (this.platform.is('ios')) {
this.apptroveCordovaPlugin.updatePostbackConversion(10);
}

Support

For technical support and questions:


This guide provides implementation of SKAdNetwork postback conversion with the Apptrove Cordova SDK, ensuring proper attribution tracking while respecting user privacy on iOS 14.5+.