[NEW] Unity SDK: Adding SKAdNetwork Support

Singular Unity SDK
Singular Unity SDK version 2.1.0
Compatibility Unity 4.7.2+
Sample App Review our sample app for an example of a complete SDK integration based on best practices.
Integration Guides
  1. Basic Integration
  2. Tracking Events and Revenue
  3. Implementing Deep Links
  4. Adding SKAdNetwork Support
  5. Advanced Options

Introduction: SKAdNetwork and SKAN

SKAdNetwork is Apple's new framework for attributing mobile installs without compromising the end-user's privacy. Singular's new version of the iOS SDK helps you implement SKAdNetwork seamlessly and with minimal engineering effort. This SKAdNetwork implementation is based on SKAN - a standard developed by Singular for a smooth implementation of SKAdNetwork.

For a full guide to Singular's SKAdNetwork implementation, see the iOS SDK SKAdNetwork implementation guide.

Implementing SKAdNetwork in the Unity SDK

SingularSDKObject Settings

You can configure the following options in the SingularSDKObject. For more information about each of these options, see the iOS SDK SKAdNetwork implementation guide.

Option Default
SKANEnabled False Set to true to enable SKAdNetwork support.
manualSKANConversionManagement False Set to true if you want to manage the conversion value manually.
waitForTrackingAuthorizationWithTimeoutInterval *  0 (Disabled) The value (in seconds), which designates the MAXIMUM time that the Singular SDK will wait for the user to authorize or deny AppTrackingTransparency Consent, before logging events to Singular's servers.

* On September 3rd, Apple announced an update delaying certain privacy features on iOS 14, specifically removing the requirements to use AppTrackingTransparency to access the IDFA until "early next year".  With this change, we recommend NOT implementing the AppTrackingTransprency pop-up with the iOS 14 launch, as IDFA is still accessible as of iOS 14 beta 7.  Read more about iOS 14 beta 7 and the IDFA here

waitForTrackingAuthorizationWithTimeoutInterval remains documented above, for the future unannounced version of iOS 14 where AppTrackingTransparency will be required before the IDFA can be retrieved.



SingularSDK.SkanRegisterAppForAdNetworkAttribution Method
Description Register for SKAdNetwork tracking (if you have not set SKANEnabled=true in the SingularSDK object). Note that calling this method overrides the configured value.
Signature public void SkanRegisterAppForAdNetworkAttribution()
Usage Example
SingularSDK.SkanUpdateConversionValue Method 

Update the SKAdNetwork conversion value.

Note: Use this method if you have selected to update the SKAdNetwork conversion value manually. This method will work only if manualSKANConversionManagement is set to True.

Signature public void SkanUpdateConversionValue(int value)
Usage Example
// A sign-up event happened

// Update the conversion value to 7
SingularSDK.SkanGetConversionValue Method 
Description Get the current conversion value tracked by the Singular SDK.
Signature public int? SkanGetConversionValue()
Usage Example
int? value = SingularSDK.SkanGetConversionValue();
SingularSDK.SetConversionValueUpdatedHandler Method 
Description Set a handler to receive notifications when the conversion value is updated.
Signature public void SetConversionValueUpdatedHandler(SingularConversionValueUpdatedHandler handler)
Usage Example
public class Main : MonoBehaviour, SingularConversionValueUpdatedHandler {
  void Awake() {

  void OnConversionValueUpdated(int value) {
    // Use the conversion value
Was this article helpful?