어떻게 도와드릴까요?

AppsFlyer SDK 연동 가이드 - iOS

  • 업데이트 시간

한눈에 보기:  

0 - 5달러

앱스플라이어 SDK는 앱 설치와 인앱 이벤트 측정 기능을 제공합니다. 

SDK_Integration.jpg

앱스플라이어 SDK를 통해 설치, 업데이트, 세션을 기록할 수 있고, 또한 앱 설치 이 외에도 인앱 구매나 게임 레벨 달성과 같은 인앱 이벤트를 추가로 기록하여 ROI 및 사용자 인게이지먼트 수준을 파악할 수 있습니다.

중요!

1. 통합 단계

altalt

altalt

중요!

2.

protected override void OnLaunched(LaunchActivatedEventArgs e)
{
	this .InitializeComponent();
	this .Suspending += this .OnSuspending;
	AppsFlyerLib. AppsFlyerTracker tracker =
	AppsFlyerLib. AppsFlyerTracker .GetAppsFlyerTracker();
	tracker.appId = "YOUR_APP_ID_HERE" ;
	tracker.devKey = "YOUR_DEV_KEY_HERE" ;
	tracker.trackAppLaunch();
}

tracker.TrackAppLaunchAsync(Callback);
public void Callback(AppsFlyerLib.ServerStatusCode code)
{
   if(code == AppsFlyerLib.ServerStatusCode.SUCCESS) {
//success scenario
} else if(code == AppsFlyerLib.ServerStatusCode.FAIL) {
//failure scenario
} }

3.

public void TrackEvent(string eventName, IDictionary<string, Object> eventValues)
  • 양수 또는 음수의 모든 숫자를 입력할 수 있습니다.

예시

AppsFlyerLib.AppsFlyerTracker tracker = AppsFlyerLib.AppsFlyerTracker.GetAppsFlyerTracker();
      IDictionary<string, object> eventValues = new Dictionary<string, object>();
      eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.CONTENT_ID, "id123");
      eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.REVENUE, "10");
      eventValues.Add(AppsFlyerLib.AFInAppEventParameterName.CURRENCY, "USD");
      tracker.TrackEvent(AppsFlyerLib.AFInAppEventType.ADD_TO_CART, eventValues);

tracker.TrackEventAsync(AppsFlyerLib.AFInAppEventType.PURCHASE, events, Callback);
public void Callback(AppsFlyerLib.ServerStatusCode code)
{
   if(code == AppsFlyerLib.ServerStatusCode.SUCCESS) {
//success scenario
} else if(code == AppsFlyerLib.ServerStatusCode.FAIL) {
//failure scenario
} }

4. 고급 연동

AppsFlyer로 전송된 각 인앱이벤트의 일부로 사용할 수 있는 특정 통화 코드 이외에도 다음 API를 이용해서 국제 통화 코드를 설정할 수 있습니다.

통화 코드를 설정하려면 다음의 API를 사용하세요:

tracker.currencyCode = "GBP";

고유 앱스플라이어 ID가 앱이 새로 설치될 때마다 발급됩니다.

public string getAppsFlyerUID()

이 ID는 내부 ID와 상호 참조할 수 있도록 포스트백 API와 AppsFlyer CSV 보고서에 보여집니다.

다음을 통해 고객 사용자 ID를 설정하세요:

tracker.customerUserId = "YOUR_CUSTOMER_USER_ID";

Task.Run(async () =>
{
   AppsFlyerLib.AppsFlyerTracker tracker = AppsFlyerLib.AppsFlyerTracker.GetAppsFlyerTracker();
   string conversionData = await tracker.GetConversionDataAsync();
});

AppsFlyerLib::AppsFlyerTracker^ tracker = AppsFlyerLib::AppsFlyerTracker::GetAppsFlyerTracker();
 tracker->appId = ref new Platform::String(L"APP_KEY");
 tracker->devKey = ref new Platform::String(L"APPSFLYER_KEY");
 tracker->TrackAppLaunch();
 create_task(tracker->GetConversionDataAsync()).then([tracker](Platform::String^ conversionData)
 {
 Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^>^ eventValues
 = ref new Platform::Collections::Map<Platform::String^, Platform::Object^>();

eventValues->Insert(AppsFlyerLib::AFInAppEventParameterName::CONTENT_ID, "134");
 eventValues->Insert(AppsFlyerLib::AFInAppEventParameterName::CONTENT_TYPE, "Virtual Goods");
 eventValues->Insert(AppsFlyerLib::AFInAppEventParameterName::CURRENCY, "USD");
 eventValues->Insert(AppsFlyerLib::AFInAppEventParameterName::REVENUE, "9.99");

tracker->TrackEvent(AppsFlyerLib::AFInAppEventType::PURCHASE, eventValues);
 });