监测 config 方法

setDeferredDeepLinkDelegate

指定打开深度链接时 SDK 调用的代理函数。

public void setDeferredDeeplinkDelegate(Action<string> deferredDeeplinkDelegate, string sceneName = "Adjust")
C#
private void DeferredDeeplinkCallback(string deeplinkURL) {
   //...
}

AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox);
adjustConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback);
Adjust.start(adjustConfig);

setAttributionChangedDelegate

指定用户归因发生更新时 SDK 调用的代理函数。

public void setAttributionChangedDelegate(Action<adjustattribution> attributionChangedDelegate, string sceneName = "Adjust")
C#
public class ExampleGUI : MonoBehaviour {
    void OnGUI() {
        if (GUI.Button(new Rect(0, 0, Screen.width, Screen.height), "callback")) {
            AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox);
            adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
            adjustConfig.setAttributionChangedDelegate(this.attributionChangedDelegate);
            Adjust.start(adjustConfig);
        }
    }

    public void attributionChangedDelegate(AdjustAttribution attribution) {
        Debug.Log("Attribution changed");
        // ...
    }
}

setEventSuccessDelegate

指定 SDK 跟踪到事件时调用的代理函数。

public void setEventSuccessDelegate(Action<adjusteventsuccess> eventSuccessDelegate, string sceneName = "Adjust")
C#
AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setEventSuccessDelegate(EventSuccessCallback);
//...
Adjust.start(adjustConfig);
//...
public void EventSuccessCallback(AdjustEventSuccess eventSuccessData) {
    //...
}

setEventFailureDelegate

指定 SDK 未跟踪到事件时调用的代理函数。

public void setEventFailureDelegate(Action<adjusteventfailure> eventFailureDelegate, string sceneName = "Adjust")
C#
AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setEventFailureDelegate(EventFailureCallback);
//...
Adjust.start(adjustConfig);
//...
public void EventFailureCallback(AdjustEventFailure eventFailureData) {
    //...
}

setSessionSuccessDelegate

指定 SDK 跟踪到会话时调用的代理函数。

public void setSessionSuccessDelegate(Action<adjustsessionsuccess> sessionSuccessDelegate, string sceneName = "Adjust")
C#
AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setSessionSuccessDelegate(SessionSuccessCallback);
//...
Adjust.start(adjustConfig);
//...
public void SessionSuccessCallback (AdjustSessionSuccess sessionSuccessData) {
    //...
}

setSessionFailureDelegate

指定 SDK 未跟踪到会话时调用的代理函数。

public void setSessionFailureDelegate(Action<adjustsessionfailure> sessionFailureDelegate, string sceneName = "Adjust")
C#
AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setSessionFailureDelegate(SessionFailureCallback);
//...
Adjust.start(adjustConfig);
//...
public void SessionFailureCallback (AdjustSessionFailure sessionFailureData) {
    //...
}