본 가이드에서는 구매 취소 이벤트를 수집하여, 채널별로 실구매(구매완료-구매취소) 성과 분석을 할 수 있는 방법에 대해서 안내합니다.
설정 방법
1. 구매 취소 이벤트 수집
구매 취소 이벤트(airbridge.ecommerce.order.canceled
)는 스탠다드 이벤트 카테고리로 Actuals Report와 Raw Data Export에서 기본 이벤트 리스트에 제공하고 있습니다. 구매 취소 이벤트의 경우, 구매 이벤트(airbridge.ecommerce.order.completed
)의 후속 이벤트로 구매 이벤트의 Transaction ID를 필수적으로 매칭시켜 전송하는 것을 권장합니다.
Semantic Attributes
Attribute |
Description |
Type |
---|---|---|
transactionID | 구매 Transaction ID | string |
transactionPairedEventTimestamp | 구매 발생 당시 이벤트 Timestamp (13자리 Unix Timestamp) |
int |
totalValue | 환불 금액 | float |
totalQuantity | 환불한 전체 수량 | int |
currency | 환불 금액 통화 | string |
productListID | 환불한 Product List ID | string |
products.$0.productID | 환불한 Product ID | string |
products.$0.name | 환불한 Product Name | string |
products.$0.price | 환불한 Product 금액 | float |
products.$0.currency | 환불한 Product 금액의 통화 | string |
products.$0.quantity | 환불한 Product 개수 | int |
아래 샘플 코드를 참고해, SDK를 통해 구매 취소 이벤트를 전송할 수 있습니다.
airbridge.events.send("airbridge.ecommerce.order.canceled", {
semanticAttributes: {
transactionID: '1458132a-0d09-4944-a686-fcbee81b74f7',
transactionPairedEventTimestamp: 1599186193324,
totalValue: 99000,
products: [{
productID: "1234",
name: "Nike 1",
price: 55000,
currency: "KRW",
quantity: 1
}, {
productID: "1235",
name: "Nike 2",
price: 44000,
currency: "KRW",
quantity: 1
}]
}
});
#import <AirBridge / ABInAppEvent.h>
ABInAppEvent * event = [[ABInAppEvent alloc] init];
[event setCategory: @ "airbridge.ecommerce.order.canceled"];
NSDictionary * semantics = @ {
@"transactionID": @"1458132a-0d09-4944-a686-fcbee81b74f7",
@"transactionPairedEventTimestamp": @1599186193324,
@"totalValue": @99000,
@ "products": @[@{
@"productID": @"1234",
@"name": @"Nike 1",
@"price": @55000,
@"currency": @"KRW",
@"quantity": @1,
}, @{
@"productID": @"1235",
@"name": @"Nike 2",
@"price", @44000,
@"currency": @"KRW",
@"quantity": @1,
}],
};
[event setSemantics: semantics];
[event send];
let event = ABInAppEvent ()
event?.setCategory ("airbridge.ecommerce.order.canceled")
let semantics : [String: Any]= [
"transactionID" : "1458132a-0d09-4944-a686-fcbee81b74f7",
"transactionPairedEventTimestamp" : 1599186193324,
"totalValue" : 99000,
"products" : [
[
"productID" : "1234",
"name" : "Nike 1",
"price" : 55000,
"currency" : "KRW",
"quantity" : 1,
],
[
"productID" : "1235",
"name" : "Nike 2",
"price" : 44000,
"currency" : "KRW",
"quantity" : 1,
]
]
]
event?.setSemantics (semantics)
event?.send ()
Map < String, Object > product1 = new HashMap < > ();
product1.put("productID", "1234");
product1.put("name", "Nike 1");
product1.put("price", 55000);
product1.put("currency", "KRW");
product1.put("quantity", 1);
Map < String, Object > product2 = new HashMap < > ();
product1.put("productID", "1235");
product1.put("name", "Nike 2");
product1.put("price", 44000);
product1.put("currency", "KRW");
product1.put("quantity", 1);
List < Map < String, Object >> products = new ArrayList < > ();
products.add(product1);
products.add(product2);
Map < String, Object > semanticAttributes = new HashMap < > ();
semanticAttributes.put("transactionID", "1458132a-0d09-4944-a686-fcbee81b74f7");
semanticAttributes.put("transactionPairedEventTimestamp", 1599186193324 L);
semanticAttributes.put("totalValue", 99000);
semanticAttributes.put("product", products);
Airbridge.trackEvent("airbridge.ecommerce.order.canceled", // Category null, // Action null, // Label null, // Value null, // Custom Attributes semanticAttributes // Semantic Attributes );
Airbridge.trackEvent(
category = "airbridge.ecommerce.order.canceled",
semanticAttributes =
mapOf(
"transactionID" to "1458132a-0d09-4944-a686-fcbee81b74f7",
"transactionPairedEventTimestamp" to 1599186193324L,
"totalValue" to 99000,
"products" to
mapOf(
"totalValue" to 99000,
"product" to
listOf(
mapOf(
"productID" to "1234",
"name" to "Nike 1",
"price" to 55000,
"currency" to "KRW",
"quantity" to 1
),
mapOf(
"productID" to "1235",
"name" to "Nike 2",
"price" to 44000,
"currency" to "KRW",
"quantity" to 1
)
)
)
)
)
Custom 취소 이벤트 수집
구매 취소(airbridge.ecommerce.order.cancelled) 외에 예약 취소나 견적 요청 취소 등의 커스텀 취소 이벤트를 수집하려면, semanticAttributes.transactionType
에 "cancel"을 넣고, semanticAttributes.transactionPairedEventCategory
(취소하고자하는 이벤트 카테고리)값을 아래와 같이 넣어줍니다.
airbridge.events.send("reservation_cancel", {
semanticAttributes: {
transactionID: '1458132a-0d09-4944-a686-fcbee81b74f7',
transactionType: 'cancel',
transactionPairedEventCategory: 'reservation',
transactionPairedEventTimestamp: 1599186193324
}
});
참고로 구매 취소(airbridge.ecommerce.order.canceled)이벤트의 semanticAttributes.transactionType
("cancel")과 semanticAttributes.transactionPairedEventCategory
("airbridge.ecommerce.order.completed") 값은 자동으로 채워지기 때문에 따로 넣어줄 필요는 없습니다.
![]()
취소 이벤트에 관한 광고 성과 측정 여부
airbridge.ecommerce.order.canceled
이벤트 카테고리나semanticAttributes.transactionType
이 "cancel"로 들어온 취소 이벤트의 경우, 어트리뷰션 결과값이 "unattributed"로 처리됩니다.
2. 실구매 성과 분석
Raw Data Export를 통해 구매완료이벤트와 구매취소이벤트를 추출하여, Transaction ID 기준으로 매칭하여 채널별 실구매 성과를 분석할 수 있습니다.