Unreal Engine SDK: Adding SKAdNetwork Support

Singular Unreal Engine SDK
Download
Singular Unreal Engine SDK version 1.0.0
Compatibility

Unreal Engine 4.23+

Integration Guides
  1. Basic Integration
  2. Tracking Events and Revenue
  3. Adding SKAdNetwork Support
  4. 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 Unreal Engine SDK

USingularSDKBPLibrary::Initialize Method Settings

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

Option Default
Description
skAdNetworkEnabled False Set to true to enable SKAdNetwork support.
manualSKANConversionManagement False Set to true if you want to manage the conversion value manually.

SKAdNetwork Methods

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
USingularSDKBPLibrary::SkanRegisterAppForAdNetworkAttribution();
SingularSDK SkanUpdateConversionValue Method 
Description

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 conversionValue)
Usage Example
// A sign-up event happened
USingularSDKBPLibrary::SendEvent("SignUp");

// Update the conversion value to 7
USingularSDKBPLibrary::SkanUpdateConversionValue(7);
SingularSDK SkanGetConversionValue Method 
Description Get the current conversion value tracked by the Singular SDK.
Signature public int SkanGetConversionValue()
Usage Example
int value = USingularSDKBPLibrary::SkanGetConversionValue();

Register to SKAN Conversion Value Updated

  1. Add #include "SingularDelegates.h" to the top of the header file of the class that you want to register the delegate.
  2. Add the following to your class:

    // A delegate to register that invokes the Conversion Value updated
    UPROPERTY(BlueprintAssignable, Category = "Singular-SDK")
    FOnConversionValueUpdated OnConversionValueUpdated;
    
    // The method we will use to register the delegate
    UFUNCTION()
    void NewConversionValue(int32 conversionValue);
  3. In the class cpp file register to the event:

    OnConversionValueUpdated.AddDynamic(this,&YOURCLASS::NewConversionValue);
Was this article helpful?