연동
AppsFlyerObject 프리팹을 사용하거나 수동으로 플러그인을 초기화할 수 있습니다.
- AppsFlyerObject.prefab 사용하기
- 수동 연동
- ATTrackingManager로 IDFA 수집하기
- SKAN 포스트백을 앱스플라이어로 보내기
- MacOS 초기화
- 리스너 요청(선택사항)
AppsFlyerObject.prefab 사용하기
- 애셋 > 앱스플라이어로 이동하여 AppsFlyerObject.prefab을 씬으로 드래그합니다.
- 다음 필드를 업데이트합니다.
설정 | 설명 |
---|---|
Dev 키 | 앱스플라이어의 Dev-Key, 앱스플라이어 대시보드에서 액세스할 수 있습니다. |
앱 ID | iTunes 애플리케이션 ID. (앱이 iOS 용이 아닌 경우 필드를 비워 두십시오) |
전환 데이터 가져오기 | 앱이 딥링킹에 앱스플라이어를 사용하는 경우 이 값을 true로 설정합니다. |
isDebug | 디버그 로그를 보려면 이 값을 true로 설정합니다. (개발 전용!) |
- 자산 > 앱스플라이어 > AppsFlyerObjectScript.cs의 코드를 사용 가능한 다른 API로 업데이트합니다.
수동 연동
게임 개체를 만들고 다음 init 코드를 추가합니다.
using AppsFlyerSDK;
public class AppsFlyerObjectScript : MonoBehaviour
{
void Start()
{
AppsFlyer.initSDK("devkey", "appID");
AppsFlyer.startSDK();
}
}
일러두기:
- 게임 개체에서 destroy를 호출하지 않도록 하십시오.
- Use
DontDestroyOnLoad
새 장면을 로드할 때 개체를 유지하기 위한 것입니다.
ATTrackingManager로 IDFA 수집하기
-
다음을
AppTrackingTransparency
Xcode 프로젝트에 추가할 프레임워크입니다. -
다음
Info.plist
:- 리스트에 항목을 추가하십시오. 옆의 +를 누르면 됩니다
Information Property List
. - 스크롤 다운하여 선택
Privacy - Tracking Usage Description
. - IDFA 수집 허가를 요청할 때 앱 사용자에게 보일 문구를 값으로 입력합니다.
- 리스트에 항목을 추가하십시오. 옆의 +를 누르면 됩니다
-
호출
waitForATTUserAuthorizationWithTimeoutInterval
APIstartSDK()
#if UNITY_IOS && !UNITY_EDITOR AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(60); #endif
-
프롬프트를 표시할 위치에 추적 권한을 요청합니다.
다음 패키지 또는 추적 권한을 요청할 수 있는 기타 패키지를 사용할 수 있습니다.using Unity.Advertisement.IosSupport; /* ... */ if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED) { ATTrackingStatusBinding.RequestAuthorizationTracking(); } /* ... */
SKAN 포스트백을 앱스플라이어로 보내기
앱스플라이어 엔드포인트를 등록하려면 info.plist에 NSAdvertisingAttributionReportEndpoint
키를 추가하고 값을 다음과 같이 설정해야 합니다 https://appsflyer-skadnetwork.com/
.
info.plist를 업데이트하는 방법에 대한 자세한 내용은 여기에서 확인할 수 있습니다.
MacOS 초기화
- 프리팹 사용
AppsFlyerObject
- MacOS 앱 ID 추가
- 플랫폼 용으로
PC, Mac & Linux Standelone
구축하고MacOS
타겟 플랫폼으로 선택합니다.
리스너 요청(선택사항)
- 'AppsFlyer.cs'의 스크립트를 앱스플라이어 초기화 코드로 게임 개체에 첨부합니다. (AppsFlyerObject, ect)
- startSDK() 앞에 다음 코드를 추가합니다.
세션 응답 예시:
void Start()
{
AppsFlyer.OnRequestResponse += AppsFlyerOnRequestResponse;
AppsFlyer.initSDK(devKey, appID, this);
AppsFlyer.startSDK();
}
void AppsFlyerOnRequestResponse(object sender, EventArgs e)
{
var args = e as AppsFlyerRequestEventArgs;
AppsFlyer.AFLog("AppsFlyerOnRequestResponse", " status code " + args.statusCode);
}
인앱 응답 예시:
void Start()
{
AppsFlyer.OnInAppResponse += (sender, args) =>
{
var af_args = args as AppsFlyerRequestEventArgs;
AppsFlyer.AFLog("AppsFlyerOnRequestResponse", " status code " + af_args.statusCode);
};
AppsFlyer.initSDK(devKey, appID, this);
AppsFlyer.startSDK();
}
statusCode | errorDescription |
---|---|
200 | null |
10 | "Event timeout. Check 'minTimeBetweenSessions' param |
11 | "Skipping event because 'isStopTracking' enabled" |
40 | Network error: Error description comes from Android |
41 | "No dev key" |
50 | "Status code failure" + 서버에서 받은 실제 응답 코드 |
최신 데이터 3일 전