인앱 이벤트 추적
인앱 이벤트를 추적하여 캠페인 성과를 분석하고 사용자 로그인, 등록, 튜토리얼 완료 또는 진행 마일스톤과 같은 핵심 성과 지표(KPI)를 측정할 수 있습니다.
표준 이벤트 및 속성
표준 이벤트 사용
Singular는 보고 및 최적화를 위해 애드 네트워크에서 인식하는 표준 이벤트를지원합니다. 자동 인식 및 간소화된 설정을 위해 가능하면 표준 이벤트 이름을 사용하세요.
UA, 마케팅 또는 비즈니스 팀은 조직의 마케팅 KPI를 기반으로 이벤트 목록을 컴파일해야 합니다. 인앱 이벤트 추적 방법가이드를 참조하세요 : Singular 어트리뷰션 고객을 위한 가이드에서계획을 세우세요.
각 이벤트는 다양한 어트리뷰트를 지원합니다. 구현에 대한 자세한 내용은 이벤트별 권장 표준 어트리뷰트를참조하세요.
이벤트 전송
이벤트 구현 가이드라인
보강 데이터에 대한 선택적 속성과 함께 Event() 메서드를 사용하여 Singular에 이벤트를 전송합니다.
-
표준 이벤트: 표준 이벤트 목록에서 이벤트의 Unity 이름을사용합니다(예:
Events.sngLogin). - 커스텀 이벤트: 표준 이벤트와 일치하지 않는 앱 고유의 이벤트의 경우 문자 수 제한을 준수하는 설명 문자열을 사용합니다.
커스텀 이벤트 제한:
- 언어: 타사 파트너 및 분석 솔루션과의 호환성을 보장하기 위해 이벤트 이름과 속성을 영어로 전달합니다.
- 이벤트 이름: 32자로 제한됩니다. ASCII가 아닌 문자열은 UTF-8로 변환할 때 32바이트 미만이어야 합니다.
- 속성 및 값: 500자로 제한
이벤트 메서드
가변 인수 또는 Dictionary 형식을 사용하여 추가 정보가 포함되거나 포함되지 않은 사용자 이벤트를 보고합니다.
메서드 서명:
public static void Event(string name)
public static void Event(string name, params object[] args)
public static void Event(Dictionary<string, object> args, string name)
참고: params object[] args서명을 사용하는 경우, 인수 목록에 짝수 개의 요소(키-값 쌍)가 포함되어야 하며 그렇지 않으면 이벤트가 거부됩니다. 딕셔너리를 전달할 때 값은 문자열, int, long, float, double, null, ArrayList, Dictionary<string, object> 중 한 가지 유형이어야 합니다.
사용 예시
// Example 1: Standard event without attributes
SingularSDK.Event(Events.sngLogin);
// Example 2: Standard event with recommended attributes (key-value pairs)
SingularSDK.Event(Events.sngTutorialComplete,
Attributes.sngAttrContent, "Unity Basics",
Attributes.sngAttrContentId, 32,
Attributes.sngAttrContentType, "video",
Attributes.sngAttrSuccess, "yes"
);
// Example 3: Standard event with attributes using Dictionary
Dictionary<string, object> attributes = new Dictionary<string, object>()
{
[Attributes.sngAttrContent] = "Unity Basics",
[Attributes.sngAttrContentId] = 32,
[Attributes.sngAttrContentType] = "video",
[Attributes.sngAttrSuccess] = "yes"
};
SingularSDK.Event(attributes, Events.sngTutorialComplete);
// Example 4: Custom event without attributes
SingularSDK.Event("SignUp");
// Example 5: Custom event with custom attributes
SingularSDK.Event("Bonus Points Earned", "Points", 500, "Level", 5);
인앱 구매 추적
인앱 구매(IAP), 구독, 커스텀 구매원의 구매을 추적하여 캠페인 성과와 광고 비용 대비 구매률(ROAS)을 측정할 수 있습니다.
구매 데이터는 세 가지 채널을 통해 전달됩니다:
- 인터랙티브 보고서: Singular 대시보드에서 구매 지표를 볼 수 있습니다.
- 로그 내보내기: 사용자 지정 분석을 위해 상세한 ETL 데이터에 액세스
- 실시간 포스트백: 구매 이벤트를 외부 플랫폼으로 전송
구매 이벤트 제한:
- 이벤트 이름: 사용자 지정 구매 이벤트 이름은 32자(UTF-8로 변환할 경우 ASCII가 아닌 경우 32바이트)로 제한됩니다.
- 속성: 이벤트 속성 이름 및 값은 500자로 제한됩니다.
- 통화 코드: 모두 대문자이어야 하며 세 글자로 구성된 ISO 4217 표준을따라야 합니다(예: USD, EUR, INR).
참고: 다른 통화로 표시된 구매은 Singular 계정에 설정된 조직의 기본 통화로 자동 변환됩니다.
모범 사례
- 표준 이름 지정: Singular의 표준 이벤트 및 속성 명명 규칙을사용합니다.
- 언어: 애드 네트워크 포스트백 호환성 향상을 위해 맞춤 구매 이벤트 이름을 영어로 전송하세요.
- 0이 아닌 금액: 금액이 0보다 크거나 작은 경우에만 구매 이벤트를 전송합니다.
Unity IAP 연동
유니티 IAP를 통한 인앱 구매
강화된 보고 및 거래 유효성 검사를 위해 Unity의 IAP 구매 또는 주문 오브젝트를 InAppPurchase() 메서드로 전달합니다.
혜택
- 풍부한 데이터: 포괄적인 리포트를 위해 전체 거래 세부 정보를 수신합니다.
- 사기 방지: 트랜잭션 영수증을 통해 인앱 사기 방지를 위한 유효성 검사 가능
Unity IAP 버전 호환성:
-
Unity IAP v5: Google Play 빌링 라이브러리 7+와 함께 새로운 Unity 구매 API를사용합니다. Unity 2021.3 LTS 이상과 호환됩니다.
InAppPurchase(Order)방법 사용 -
Unity IAP v4: Google Play 빌링 라이브러리 6과 함께 이전 Unity IAP API를사용합니다. Unity 2018.4 LTS부터 2020.3 LTS까지 호환됩니다.
InAppPurchase(Product)메서드 사용
인앱 구매 메서드(Unity IAP v5)
자동 유효성 검사 및 강화된 데이터를 위해 Unity IAP v5의 주문 오브젝트를 사용하여 IAP 이벤트를 전송합니다.
메서드 서명:
public static void InAppPurchase(Order order)
public static void InAppPurchase(Order order, Dictionary<string, object> attributes)
public static void InAppPurchase(Order order, bool isRestored)
public static void InAppPurchase(Order order, string eventName, Dictionary<string, object> attributes)
사용 예시
// Example 1: IAP with order object only
SingularSDK.InAppPurchase(order);
// Example 2: IAP with order and additional attributes
Dictionary<string, object> attr = new Dictionary<string, object>()
{
["promo_code"] = "SUMMER2025",
["user_tier"] = "premium"
};
SingularSDK.InAppPurchase(order, attr);
// Example 3: IAP with restored transaction flag
SingularSDK.InAppPurchase(order, true);
// Example 4: IAP with custom event name and attributes
Dictionary<string, object> attr = new Dictionary<string, object>()
{
["subscription_tier"] = "gold",
["billing_period"] = "monthly"
};
SingularSDK.InAppPurchase(order, "PremiumSubscription", attr);
인앱 구매 메서드(Unity IAP v4)
자동 유효성 검사 및 보강된 데이터를 위해 Unity IAP v4의 Product 오브젝트를 사용하여 IAP 이벤트를 전송합니다.
메서드 서명:
public static void InAppPurchase(Product product, Dictionary<string, object> attributes, bool isRestored = false)
public static void InAppPurchase(string eventName, Product product, Dictionary<string, object> attributes, bool isRestored = false)
public static void InAppPurchase(IEnumerable<Product> products, Dictionary<string, object> attributes, bool isRestored = false)
public static void InAppPurchase(string eventName, IEnumerable<Product> products, Dictionary<string, object> attributes, bool isRestored = false)
사용 예시
// Example 1: IAP with single product, no extra attributes
SingularSDK.InAppPurchase(myProduct, null);
// Example 2: IAP with single product and attributes
Dictionary<string, object> attr = new Dictionary<string, object>()
{
["promo_code"] = "SUMMER2025",
["user_tier"] = "premium"
};
SingularSDK.InAppPurchase(myProduct, attr);
// Example 3: IAP with custom event name
SingularSDK.InAppPurchase("PremiumUpgrade", myProduct, null);
// Example 4: IAP with list of products
SingularSDK.InAppPurchase(myProductList, null);
// Example 5: IAP with list of products and custom event name
SingularSDK.InAppPurchase("BundlePurchase", myProductList, null);
구매 유효성 검사 없는 커스텀 구매
수동 구매 추적
구매 또는 주문 오브젝트 없이 통화, 금액, 선택적 제품 세부 정보를 전달하여 구매을 추적합니다. 이 방법은 유효성 검사를 위한 거래 영수증을 제공하지 않습니다.
중요: 이 방법을 사용할 경우 Singular는 트랜잭션의 유효성을 검사할 수 없습니다. 가능하면 위에 설명된 Unity IAP 방법을 사용할 것을 강력히 권장합니다.
구매 방법
통화, 금액, 제품 세부 정보(선택 사항)가 포함된 구매 이벤트를 전송합니다.
메소드 서명:
public static void Revenue(string currency, double amount)
public static void Revenue(string currency, double amount, string productSKU, string productName, string productCategory, int productQuantity, double productPrice)
public static void Revenue(string currency, double amount, Dictionary<string, object> attributes)
사용 예시
// Example 1: Revenue without product details
SingularSDK.Revenue("USD", 1.99);
// Example 2: Revenue with product details
SingularSDK.Revenue("USD", 4.99, "coin_package_abc123", "Coin Pack 5", "Bundles", 1, 4.99);
// Example 3: Revenue with attributes dictionary
Dictionary<string, object> attributes = new Dictionary<string, object>()
{
["productSKU"] = "coin_package_abc123",
["productName"] = "Coin Pack 5",
["productCategory"] = "Bundles",
["productQuantity"] = 2,
["productPrice"] = 4.99,
["transaction_id"] = "T12345"
};
SingularSDK.Revenue("USD", 9.98, attributes);
커스텀 구매 메서드
지정된 이벤트 이름, 통화, 금액 및 선택적 거래 속성이 포함된 사용자 지정 구매 이벤트를 전송합니다.
메소드 서명:
public static void CustomRevenue(string eventName, string currency, double amount)
public static void CustomRevenue(string eventName, string currency, double amount, string productSKU, string productName, string productCategory, int productQuantity, double productPrice)
public static void CustomRevenue(string eventName, string currency, double amount, Dictionary<string, object> attributes)
사용 예시
// Example 1: Custom revenue without product details
SingularSDK.CustomRevenue("MyCustomRevenue", "USD", 9.99);
// Example 2: Custom revenue with product details
SingularSDK.CustomRevenue("MyCustomRevenue", "USD", 50.50, "abc123", "Premium Item", "Virtual Goods", 2, 25.50);
// Example 3: Custom revenue with attributes dictionary
Dictionary<string, object> attributes = new Dictionary<string, object>()
{
["productSKU"] = "premium_bundle_xyz",
["productName"] = "Premium Bundle",
["productCategory"] = "Bundles",
["productQuantity"] = 1,
["productPrice"] = 99.99,
["discount_applied"] = true
};
SingularSDK.CustomRevenue("PremiumBundlePurchase", "USD", 99.99, attributes);
하이브리드 이벤트 추적(고급)
최적의 어트리뷰션을 위해 앱에 연동된 Singular SDK를 통해 모든 이벤트와 구매을 전송합니다. 하지만, 필요한 경우 Singular는 다른 소스에서 이벤트를 수집할 수 있습니다.
Singular SDK 외부에서 전송된 이벤트는 Singular의 서버 간 이벤트 설명서를 준수해야 하며, 정확한 어트리뷰션을 위해 일치하는 기기 식별자를 제공해야 합니다.
중요:
서버 간 요청의 디바이스 식별자가 Singular SDK에서 기록한 식별자와 일치하지 않을 경우 불일치가 발생합니다:
- 초기 이벤트: Singular SDK가 디바이스 식별자를 기록하기 전에 이벤트가 도착하면, 해당 이벤트는 알 수 없는 디바이스에 대한 '첫 번째 세션'이 되어 오가닉 어트리뷰션이 발생하게 됩니다.
- 불일치 식별자: Singular SDK가 서버 간 요청에 있는 식별자와 다른 디바이스 식별자를 기록한 경우, 이벤트가 잘못 어트리뷰션됩니다.
하이브리드 이벤트 추적 가이드
내부 서버에서 이벤트 전송
내부 서버에서 구매 데이터를 수집하여 캠페인 성과와 ROI를 분석하세요.
요구 사항
- 디바이스 식별자 캡처: 인앱 등록 또는 로그인 이벤트 중에 디바이스 식별자를 캡처하여 전달한 다음 이 데이터를 사용자 ID와 함께 서버에 저장하세요. 사용자가 새 앱 세션을 생성할 때 식별자를 업데이트하여 정확한 어트리뷰션을 보장합니다.
- 플랫폼별 식별자: 플랫폼과 일치하는 디바이스 식별자를 사용하여 서버 측 이벤트를 전송합니다(예: iOS 디바이스의 경우 IDFA 또는 IDFV, 안드로이드 디바이스의 경우 GAID).
- 실시간 업데이트: Singular 내부 BI 포스트백 메커니즘을 사용하여 이벤트를 엔드포인트에 실시간으로 푸시합니다. 내부 BI 포스트백 FAQ를참조하세요.
- 구현 세부 사항: 서버 간 연동 가이드의 "구매 추적" 섹션을 검토하세요 .
구매 제공업체에서 이벤트 보내기
RevenueCat 또는 어댑터와 같은 타사 구매 제공업체를 연동하여 구매 및 구독 구매을 Singular로 전송할 수 있습니다.
지원되는 제공업체
- RevenueCat: RevenueCat 문서에서자세히 알아보기
- adapty: 어댑티브: 어댑티브 문서에서자세히 알아보기
세그먼트에서 이벤트 보내기
세그먼트에 "클라우드 모드" 대상을 추가하여 세그먼트에서 이벤트를 Singular SDK와 병행하여 Singular로 전송할 수 있도록 설정하세요.
자세한 설정 지침은 구현 가이드 Singular-Segment 연동을 참조하세요.