인앱 이벤트 추적
인앱 이벤트를 추적하여 캠페인 성과를 분석하고 사용자 로그인, 등록, 튜토리얼 완료 또는 진행 마일스톤과 같은 핵심 성과 지표(KPI)를 측정할 수 있습니다.
표준 이벤트 및 속성
표준 이벤트 사용
Singular는 보고 및 최적화를 위해 애드 네트워크에서 인식하는 표준 이벤트를지원합니다. 자동 인식 및 간소화된 설정을 위해 가능하면 표준 이벤트 이름을 사용하세요.
UA, 마케팅 또는 비즈니스 팀은 조직의 마케팅 KPI를 기반으로 이벤트 목록을 컴파일해야 합니다. 인앱 이벤트 추적 방법가이드를 참조하세요 : Singular 어트리뷰션 고객을 위한 가이드에서계획을 세우세요.
각 이벤트는 다양한 어트리뷰트를 지원합니다. 구현에 대한 자세한 내용은 이벤트별 권장 표준 어트리뷰트를참조하세요.
이벤트 전송
이벤트 구현 가이드라인
사용자 작업 및 행동을 추적하기 위해 event 또는 eventWithArgs 메서드를 사용하여 Singular에 이벤트를 전송합니다.
-
표준 이벤트: 표준 이벤트 목록에 있는 이벤트의 iOS 이름(예:
EVENT_SNG_LOGIN)을 사용합니다. - 맞춤 이벤트: 표준 이벤트와 일치하지 않는 앱 고유의 이벤트의 경우 문자 수 제한을 준수하는 설명 문자열을 사용합니다.
사용자 지정 이벤트 제한:
- 언어: 타사 파트너 및 분석 솔루션과의 호환성을 보장하기 위해 이벤트 이름과 속성을 영어로 전달합니다.
- 이벤트 이름: 32자로 제한됩니다. ASCII가 아닌 문자열은 UTF-8로 변환할 때 32바이트 미만이어야 합니다.
- 속성 및 값: 500자로 제한
이벤트 메서드
간단한 추적 시나리오를 위해 추가 정보 없이 사용자 이벤트를 보고합니다.
메서드 서명:
+ (void)event:(NSString *)name;
사용 예시
// Example 1: Standard event
Singular.event(EVENT_SNG_LOGIN)
// Example 2: Custom event
Singular.event("signup")
// Example 1: Standard event
[Singular event:EVENT_SNG_LOGIN];
// Example 2: Custom event
[Singular event:@"signup"];
eventWithArgs 메서드
구조화된 데이터에 대해 사전 형식을 사용하여 추가 정보와 함께 사용자 이벤트를 보고합니다.
메서드 시그니처:
+ (void)event:(NSString *)name withArgs:(NSDictionary *)args;
참고: args 매개변수는 하나 이상의 키-값 쌍을 포함하는 NSDictionary입니다. 키는 문자열이어야 하며 값은 NSDictionary에서 허용되는 모든 유형이 될 수 있습니다.
사용 예시
// Example 1: Standard event with recommended attributes
var dic: [AnyHashable: Any] = [:]
dic[ATTRIBUTE_SNG_ATTR_CONTENT_TYPE] = "video"
dic[ATTRIBUTE_SNG_ATTR_CONTENT_ID] = "32"
dic[ATTRIBUTE_SNG_ATTR_CONTENT] = "Telugu"
dic[ATTRIBUTE_SNG_ATTR_SUCCESS] = "yes"
Singular.event(EVENT_SNG_TUTORIAL_COMPLETE, withArgs: dic)
// Example 2: Custom event with custom attributes
var bonusData: [AnyHashable: Any] = [
"level": 10,
"points": 500
]
Singular.event("Bonus Points Earned", withArgs: bonusData)
// Example 1: Standard event with recommended attributes
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
[dic setValue:@"video" forKey:ATTRIBUTE_SNG_ATTR_CONTENT_TYPE];
[dic setValue:@"32" forKey:ATTRIBUTE_SNG_ATTR_CONTENT_ID];
[dic setValue:@"Telugu" forKey:ATTRIBUTE_SNG_ATTR_CONTENT];
[dic setValue:@"yes" forKey:ATTRIBUTE_SNG_ATTR_SUCCESS];
[Singular event:EVENT_SNG_TUTORIAL_COMPLETE withArgs:dic];
// Example 2: Custom event with custom attributes
NSMutableDictionary *bonusData = [[NSMutableDictionary alloc] init];
[bonusData setValue:@10 forKey:@"level"];
[bonusData setValue:@500 forKey:@"points"];
[Singular event:@"Bonus Points Earned" withArgs:bonusData];
인앱 구매 추적
인앱 구매(IAP), 구독, 커스텀 구매원의 구매을 추적하여 캠페인 성과와 광고 비용 대비 구매률(ROAS)을 측정할 수 있습니다.
구매 데이터는 세 가지 채널을 통해 전달됩니다:
- 인터랙티브 보고서: Singular 대시보드에서 구매 지표를 볼 수 있습니다.
- 로그 내보내기: 사용자 지정 분석을 위해 상세한 ETL 데이터에 액세스
- 실시간 포스트백: 구매 이벤트를 외부 플랫폼으로 전송
구매 이벤트 제한:
- 이벤트 이름: 사용자 지정 구매 이벤트 이름은 32자(UTF-8로 변환할 경우 ASCII가 아닌 경우 32바이트)로 제한됩니다.
- 속성: 이벤트 속성 이름 및 값은 500자로 제한됩니다.
- 통화 코드: 모두 대문자이어야 하며 세 글자 ISO 4217 표준을따라야 합니다(예: USD, EUR, INR).
모범 사례
- 표준 이름 지정: Singular의 표준 이벤트 및 속성 명명 규칙을사용하세요.
- 언어: 애드 네트워크 포스트백 호환성 향상을 위해 맞춤 구매 이벤트 이름을 영어로 전송하세요.
- 0이 아닌 금액: 금액이 0보다 크거나 작은 경우에만 구매 이벤트를 전송합니다.
비구독 인앱 구매
SK페이먼트 거래 연동
강화된 보고 및 거래 유효성 검사를 위해 StoreKit에서 iapComplete 메서드로 SKPaymentTransaction객체를 전달합니다.
혜택
- 풍부한 데이터: 포괄적인 보고서를 위해 전체 거래 세부 정보를 수신합니다.
- 사기 방지: 거래 영수증으로 인앱 사기 방지를 위한 유효성 검사 가능
참고사항:
-
필수 객체:
iapComplete메서드에는 SKPaymentTransaction객체가 필요합니다. - 통화 변환: 다른 통화로 표시된 구매은 조직의 기본 통화로 자동 변환됩니다.
-
사용자 지정 이벤트 이름:
withName매개 변수를 사용하여 보고서에서 이벤트 유형별로 구매을 분류합니다.
iapComplete 방법
자동 유효성 검사 및 보강된 데이터를 위해 SKPaymentTransaction 객체가 포함된 구매 이벤트를 전송합니다.
메소드 서명:
+ (void)iapComplete:(id)transaction;
+ (void)iapComplete:(id)transaction withName:(NSString *)name;
사용 예시
// Get the SKPaymentTransaction object
let transaction: SKPaymentTransaction = ...
// Send transaction without custom event name
Singular.iapComplete(transaction)
// Send transaction with custom event name
Singular.iapComplete(transaction, withName: "MyCustomRevenue")
// Get the SKPaymentTransaction object
SKPaymentTransaction *transaction = ...;
// Send transaction without custom event name
[Singular iapComplete:transaction];
// Send transaction with custom event name
[Singular iapComplete:transaction withName:@"MyCustomRevenue"];
구독 구매
구독 이벤트 구현
구독 구매 및 갱신을 추적하여 사용자 행동과 반복적인 구매 창출에 대한 인사이트를 확보하세요.
구현 가이드: 종합적인 구독 이벤트 기술 구현 가이드에서Singular SDK로 구독을 추적하는 방법에 대한 자세한 지침을 확인하세요.
구매 검증 없는 사용자 지정 구매
수동 구매 추적
SKPaymentTransaction 객체 없이 통화, 금액 및 선택적 제품 세부 정보를 전달하여 구매을 추적합니다. 이 방법은 유효성 검사를 위한 거래 영수증을 제공하지 않습니다.
중요: 이 메서드를 사용할 경우 Singular는 거래의 유효성을 검사할 수 없습니다. 가능하면 위에 설명된 SKPaymentTransaction 메서드를 사용하는 것이 좋습니다.
구매 메소드
통화, 금액 및 선택적 제품 세부 정보가 포함된 구매 이벤트를 전송합니다.
메소드 서명:
+ (void)revenue:(NSString *)currency amount:(double)amount;
+ (void)revenue:(NSString *)currency
amount:(double)amount
productSKU:(NSString *)productSKU
productName:(NSString *)productName
productCategory:(NSString *)productCategory
productQuantity:(int)productQuantity
productPrice:(double)productPrice;
+ (void)revenue:(NSString *)currency
amount:(double)amount
withAttributes:(NSDictionary *)attributes;
사용 예시
// Without product details
Singular.revenue("USD", amount: 1.99)
// With product details
Singular.revenue("EUR",
amount: 5.00,
productSKU: "SKU1928375",
productName: "Reservation Fee",
productCategory: "Fee",
productQuantity: 1,
productPrice: 5.00)
// With product details in a dictionary
var dic: [AnyHashable: Any] = [:]
dic[ATTRIBUTE_SNG_ATTR_ITEM_DESCRIPTION] = "100% Organic Cotton Mixed Plaid Flannel Shirt"
dic[ATTRIBUTE_SNG_ATTR_ITEM_PRICE] = "$69.95"
dic[ATTRIBUTE_SNG_ATTR_RATING] = "5 Star"
dic[ATTRIBUTE_SNG_ATTR_SEARCH_STRING] = "Flannel Shirt"
Singular.revenue("USD", amount: 19.95, withAttributes: dic)
// Without product details
[Singular revenue:@"USD" amount:1.99];
// With product details
[Singular revenue:@"EUR"
amount:5.00
productSKU:@"SKU1928375"
productName:@"Reservation Fee"
productCategory:@"Fee"
productQuantity:1
productPrice:5.00];
// With product details in a dictionary
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
[dic setValue:@"100% Organic Cotton Mixed Plaid Flannel Shirt"
forKey:ATTRIBUTE_SNG_ATTR_ITEM_DESCRIPTION];
[dic setValue:@"$69.95" forKey:ATTRIBUTE_SNG_ATTR_ITEM_PRICE];
[dic setValue:@"5 Star" forKey:ATTRIBUTE_SNG_ATTR_RATING];
[dic setValue:@"Flannel Shirt" forKey:ATTRIBUTE_SNG_ATTR_SEARCH_STRING];
[Singular revenue:@"USD" amount:19.99 withAttributes:dic];
customRevenue 메서드
지정된 이벤트 이름, 통화, 금액 및 선택적 거래 속성이 포함된 사용자 지정 구매 이벤트를 전송합니다.
메소드 서명:
+ (void)customRevenue:(NSString *)eventName
currency:(NSString *)currency
amount:(double)amount;
+ (void)customRevenue:(NSString *)eventName
currency:(NSString *)currency
amount:(double)amount
productSKU:(NSString *)productSKU
productName:(NSString *)productName
productCategory:(NSString *)productCategory
productQuantity:(int)productQuantity
productPrice:(double)productPrice;
+ (void)customRevenue:(NSString *)eventName
currency:(NSString *)currency
amount:(double)amount
withAttributes:(NSDictionary *)attributes;
사용 예시
// Without product details
Singular.customRevenue("MyCustomRevenue", currency: "USD", amount: 1.99)
// With product details
Singular.customRevenue("MyCustomRevenue",
currency: "EUR",
amount: 5.00,
productSKU: "SKU1928375",
productName: "Reservation Fee",
productCategory: "Fee",
productQuantity: 1,
productPrice: 5.00)
// With product details in a dictionary
var dic: [AnyHashable: Any] = [:]
dic[ATTRIBUTE_SNG_ATTR_ITEM_DESCRIPTION] = "100% Organic Cotton Mixed Plaid Flannel Shirt"
dic[ATTRIBUTE_SNG_ATTR_ITEM_PRICE] = "$69.95"
dic[ATTRIBUTE_SNG_ATTR_RATING] = "5 Star"
dic[ATTRIBUTE_SNG_ATTR_SEARCH_STRING] = "Flannel Shirt"
Singular.customRevenue("CustomRevenueWithArgsDic",
currency: "USD",
amount: 44.99,
withAttributes: dic)
// Without product details
[Singular customRevenue:@"MyCustomRevenue" currency:@"USD" amount:1.99];
// With product details
[Singular customRevenue:@"MyCustomRevenue"
currency:@"EUR"
amount:5.00
productSKU:@"SKU1928375"
productName:@"Reservation Fee"
productCategory:@"Fee"
productQuantity:1
productPrice:5.00];
// With product details in a dictionary
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
[dic setValue:@"100% Organic Cotton Mixed Plaid Flannel Shirt"
forKey:ATTRIBUTE_SNG_ATTR_ITEM_DESCRIPTION];
[dic setValue:@"$69.95" forKey:ATTRIBUTE_SNG_ATTR_ITEM_PRICE];
[dic setValue:@"5 Star" forKey:ATTRIBUTE_SNG_ATTR_RATING];
[dic setValue:@"Flannel Shirt" forKey:ATTRIBUTE_SNG_ATTR_SEARCH_STRING];
[Singular customRevenue:@"MyCustomRevenue"
currency:@"USD"
amount:44.99
withAttributes:dic];
StoreKit2 지원
StoreKit2 구매 추적
StoreKit2 프레임워크를 사용하는 앱의 경우 거래 및 제품 JSON 표현과 함께 customRevenue메서드를 사용합니다.
중요: 구매 유효성 검사는 StoreKit2에서 지원되지 않습니다. 메서드에는 거래 및 제품 개체에 대한 jsonRepresentation형식이 필요합니다.
메서드 서명:
+ (void)customRevenue:(NSData *)transactionJsonRepresentation
productJsonRepresentation:(NSData *)productJsonRepresentation;
+ (void)customRevenue:(NSString *)eventName
transactionJsonRepresentation:(NSData *)transactionJsonRepresentation
productJsonRepresentation:(NSData *)productJsonRepresentation;
사용 예시
// Fetch transaction and product from StoreKit2
let transaction = ... // Valid StoreKit2 transaction
let product = ... // Valid StoreKit2 product
// Custom Revenue with default __iap__ event name
Singular.customRevenue(
transactionJsonRepresentation: transaction.jsonRepresentation,
productJsonRepresentation: product.jsonRepresentation)
// Custom Revenue with custom event name
Singular.customRevenue(
"PaymentSuccess",
transactionJsonRepresentation: transaction.jsonRepresentation,
productJsonRepresentation: product.jsonRepresentation)
// Fetch transaction and product from StoreKit2
SKTransaction *transaction = ...; // Valid StoreKit2 transaction
SKProduct *product = ...; // Valid StoreKit2 product
// Convert JSON representations to NSData
NSData *transactionData = [transaction.jsonRepresentation
dataUsingEncoding:NSUTF8StringEncoding];
NSData *productData = [product.jsonRepresentation
dataUsingEncoding:NSUTF8StringEncoding];
// Custom Revenue with default __iap__ event name
[Singular customRevenue:transactionData
productJsonRepresentation:productData];
// Custom Revenue with custom event name
[Singular customRevenue:@"PaymentSuccess"
transactionJsonRepresentation:transactionData
productJsonRepresentation:productData];
하이브리드 이벤트 추적(고급)
최적의 어트리뷰션을 위해 앱에 연동된 Singular SDK를 통해 모든 이벤트와 구매을 전송합니다. 하지만, 필요한 경우 Singular는 다른 소스에서 이벤트를 수집할 수 있습니다.
Singular SDK 외부에서 전송된 이벤트는 Singular의 서버 간 이벤트 설명서를 준수해야 하며, 정확한 어트리뷰션을 위해 일치하는 기기 식별자를 제공해야 합니다.
중요:
서버 간 요청의 디바이스 식별자가 Singular SDK에 기록된 식별자와 일치하지 않을 경우 불일치가 발생합니다:
- 초기 이벤트: Singular SDK가 디바이스 식별자를 기록하기 전에 이벤트가 도착하면, 해당 이벤트는 알 수 없는 디바이스에 대한 '첫 번째 세션'이 되어 오가닉 어트리뷰션이 발생하게 됩니다.
- 불일치 식별자: Singular SDK가 서버 간 요청에 있는 식별자와 다른 디바이스 식별자를 기록한 경우, 이벤트가 잘못 어트리뷰션됩니다.
하이브리드 이벤트 추적 가이드
내부 서버에서 이벤트 전송
내부 서버에서 구매 데이터를 수집하여 캠페인 성과와 ROI를 분석하세요.
요구 사항
- 디바이스 식별자를 캡처합니다: 인앱 등록 또는 로그인 이벤트 중에 디바이스 식별자를 캡처하여 전달한 다음 이 데이터를 사용자 ID와 함께 서버에 저장하세요. 사용자가 새 앱 세션을 생성할 때 식별자를 업데이트하여 정확한 어트리뷰션을 보장합니다.
- 플랫폼별 식별자: 플랫폼과 일치하는 디바이스 식별자를 사용하여 서버 측 이벤트를 전송합니다(예: iOS 디바이스의 경우 IDFA 또는 IDFV).
- 실시간 업데이트: Singular 내부 BI 포스트백 메커니즘을 사용하여 이벤트를 엔드포인트에 실시간으로 푸시합니다. 내부 BI 포스트백 FAQ를참조하세요.
- 구현 세부 사항: 서버 간 연동 가이드의 "구매 추적" 섹션을 검토하세요 .
구매 제공업체에서 이벤트 보내기
RevenueCat 또는 어댑터와 같은 타사 구매 제공업체를 연동하여 구매 및 구독 구매을 Singular로 전송할 수 있습니다.
지원되는 제공업체
- RevenueCat: RevenueCat 문서에서자세히 알아보기
- adapty: 어댑티브: 어댑티브 문서에서자세히 알아보기
세그먼트에서 이벤트 보내기
세그먼트에 "클라우드 모드" 대상을 추가하여 세그먼트에서 이벤트를 Singular SDK와 병행하여 Singular로 전송할 수 있도록 설정하세요.
자세한 설정 지침은 구현 가이드 Singular-Segment 연동을 참조하세요.