인앱 이벤트 트래킹
인앱 이벤트를 트래킹하여 캠페인 성과를 분석하고 유저 로그인, 회원가입, 튜토리얼 완료, 진행 마일스톤 등 핵심성과지표(KPI)를 측정합니다.
표준 이벤트 및 속성
표준 이벤트 사용
Singular은 광고 네트워크가 리포팅과 최적화를 위해 인식하는 표준 이벤트 를 지원합니다. 자동 인식과 간소화된 설정을 위해 가능한 경우 항상 표준 이벤트 이름을 사용하세요.
UA, 마케팅 또는 비즈니스 팀이 조직의 마케팅 KPI를 기반으로 이벤트 목록을 작성해야 합니다. 계획 수립 시 인앱 이벤트 트래킹 방법: Singular 어트리뷰션 고객용 가이드 를 참고하세요.
각 이벤트는 다양한 속성을 지원합니다. 구현 세부 정보는 이벤트별 권장 표준 속성 을 참고하세요.
이벤트 전송
이벤트 구현 가이드라인
유저 액션과 행동을 트래킹하기 위해
event
또는
eventWithArgs
메서드를 사용하여 Singular로 이벤트를 전송합니다.
-
표준 이벤트:
표준 이벤트 목록의
이벤트 iOS 이름
을 사용합니다. 예:
EVENT_SNG_LOGIN - 커스텀 이벤트: 표준 이벤트와 일치하지 않는 앱 고유 이벤트의 경우, 문자 제한을 준수하는 임의의 설명적인 문자열을 사용하세요
커스텀 이벤트 제한 사항:
- 언어: 서드파티 파트너 및 분석 솔루션과의 호환성을 보장하기 위해 이벤트 이름과 속성은 영어로 전달하세요
- 이벤트 이름: ASCII 32자로 제한됩니다. 비 ASCII 문자열은 UTF-8로 변환 시 32바이트 미만이어야 합니다
- 속성과 값: ASCII 500자로 제한됩니다
event 메서드
추가 정보 없이 간단한 트래킹 시나리오에서 유저 이벤트를 보고합니다.
메서드 시그니처:
+ (void)event:(NSString *)name;
+event:
는
void
를 반환합니다 — 호출 시점에는 성공/실패 신호가 없습니다. 이름이
nil
이거나 비어 있는 경우, 또는
+start:
가 아직 호출되지 않은 경우 SDK는 이벤트를 조용히 드롭합니다. 문제를 확인하려면 로그를 검사하세요.
사용 예시
// 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 대시보드에서 매출 지표를 확인합니다
- Export Logs: 커스텀 분석을 위해 상세한 ETL 데이터에 액세스합니다
- 실시간 포스트백: 외부 플랫폼으로 매출 이벤트를 전송합니다
매출 이벤트 제한 사항:
- 이벤트 이름: 커스텀 매출 이벤트 이름은 ASCII 32자로 제한됩니다(비 ASCII는 UTF-8로 변환 시 32바이트)
- 속성: 이벤트 속성 이름과 값은 ASCII 500자로 제한됩니다
- 통화 코드: 모두 대문자여야 하며 세 글자 ISO 4217 표준 을 따라야 합니다(예: USD, EUR, INR)
모범 사례
- 표준 명명: Singular의 표준 이벤트 및 속성 명명 규칙 을 사용하세요
- 언어: 광고 네트워크 포스트백 호환성 향상을 위해 커스텀 매출 이벤트 이름은 영어로 전송하세요
- 0이 아닌 금액: 금액이 0보다 크거나 작은 경우에만 매출 이벤트를 전송하세요
비구독형 인앱 구매
SKPaymentTransaction 연동
StoreKit의
SKPaymentTransaction
객체를
iapComplete
메서드에 전달하여 풍부한 리포팅과 트랜잭션 검증을 활용하세요.
이점:
- 풍부한 데이터: Singular은 종합적인 리포팅을 위해 완전한 트랜잭션 세부 정보를 받습니다
- 사기 방지: 트랜잭션 영수증을 통해 인앱 사기 방지를 위한 검증이 가능합니다
비고:
-
필수 객체:
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 메서드를 사용하는 것을 강력히 권장합니다.
revenue 메서드
통화, 금액 및 선택적 제품 세부 정보와 함께 매출 이벤트를 전송합니다.
메서드 시그니처:
+ (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를 분석합니다.
요구사항:
- 디바이스 식별자 캡처: 인앱 회원가입 또는 로그인 이벤트 시 디바이스 식별자를 캡처하고 전달한 다음, 이 데이터를 User ID와 함께 서버에 저장합니다. 올바른 어트리뷰션을 위해 유저가 새 앱 세션을 생성할 때 식별자를 업데이트하세요
- 플랫폼별 식별자: 플랫폼에 맞는 디바이스 식별자(예: iOS 디바이스의 경우 IDFA 또는 IDFV)와 함께 서버 측 이벤트를 전송하세요
- 실시간 업데이트: Singular Internal BI 포스트백 메커니즘을 사용하여 엔드포인트로 이벤트를 실시간 푸시하세요. Internal BI Postback FAQ 를 참고하세요
- 구현 세부 정보: 서버 간 연동 가이드의 "Tracking Revenue" 섹션을 참고하세요
매출 제공업체에서 이벤트 전송
RevenueCat 또는 adapty와 같은 서드파티 매출 제공업체를 연동하여 구매 및 구독 매출을 Singular로 전송합니다.
지원되는 제공업체:
- RevenueCat: 자세한 내용은 RevenueCat 문서 를 참고하세요
- adapty: 자세한 내용은 adapty 문서 를 참고하세요
Segment에서 이벤트 전송
Segment에 "Cloud-Mode" 대상을 추가하여 Singular SDK와 병행하여 Segment가 Singular로 이벤트를 전송하도록 활성화합니다.
자세한 설정 지침은 구현 가이드 Singular-Segment 연동 를 참고하세요.