이벤트
DFINERY SDK를 사용하여 사용자 이벤트를 기록하는 방법입니다. SDK 연동이 선행되어야 합니다.
시작하기 전에
이벤트를 기록하기 전에 DFINERY 콘솔에 이벤트를 등록 후 연동해 주세요. 이벤트 등록은 콘솔의 부가 설정 / 데이터 연동 / 이벤트 관리 / 이벤트 목록에서 할 수 있습니다.
등록되지 않은 이벤트, 이벤트 속성, 잘못된 타입의 이벤트 속성이 기록될 경우, 혹은 등록된 이벤트 속성 중 하나라도 누락될 경우 이벤트가 기록되지 않습니다.
이벤트 기록
다음의 logEvent
메소드 중 하나를 호출하여 이벤트를 기록합니다. 표준 이벤트는 상수를 제공합니다.
func logEvent(_ name: String)
func logEvent(_ name: String, properties: [String: Any])
각각의 매개변수는 다음을 의미합니다.
name
: 이벤트 이름properties
: 이벤트 속성
사용 예시
// 이벤트만 기록할 경록
Dfinery.shared().logEvent(DFEvent.LOGIN)
// 이벤트 속성과 함께 기록할 경우
Dfinery.shared().logEvent(
"custom_event",
properties: ["custom_key": "custom_value"]
)
// 이벤트 속성, 아이템 모두 기록할 경우
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "apple",
DFEventProperty.ITEM_PRICE: 1000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "b131901200",
DFEventProperty.ITEM_NAME: "car",
DFEventProperty.ITEM_PRICE: 1000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0
]
let properties: [String: Any] = [
DFEventProperty.TOTAL_PURCHASE_AMOUNT: 2,
DFEventProperty.ORDER_ID: "a0b1c211",
DFEventProperty.PAYMENT_METHOD: "credit_card",
DFEventProperty.DELIVERY_CHARGE: 0.0,
DFEventProperty.DISCOUNT: 0.0,
DFEventProperty.ITEMS: [item1, item2]
]
Dfinery.shared().logEvent(DFEvent.PURCHASE, properties: properties)
logEvent:(NSString * _Nonnull)
logEvent:(NSString * _Nonnull) withProperties:(NSDictionary<NSString *,id> * _Nonnull)
각각의 매개변수는 다음을 의미합니다.
첫번 째 파라미터
: 이벤트 이름properties
: 이벤트 속성
사용 예시
// 이벤트만 기록할 경우
[[Dfinery shared] logEvent:DFEvent.LOGIN];
// 이벤트 속성과 함께 기록할 경우
[[Dfinery shared] logEvent:@"custom_event" properties:@{
@"custom_key": @"custom_value"
}];
// 이벤트 속성, 아이템 모두 기록할 경우
NSDictionary *item1 = @{
DFEventProperty.ITEM_ID: @"b1319000",
DFEventProperty.ITEM_NAME: @"apple",
DFEventProperty.ITEM_PRICE: @1000.0,
DFEventProperty.ITEM_QUANTITY: @1,
DFEventProperty.ITEM_DISCOUNT: @0.0
};
NSDictionary *item2 = @{
DFEventProperty.ITEM_ID: @"a8901200",
DFEventProperty.ITEM_NAME: @"car",
DFEventProperty.ITEM_PRICE: @600000.0,
DFEventProperty.ITEM_QUANTITY: @2
DFEventProperty.ITEM_DISCOUNT: @0.0
};
NSArray<NSDictionary *> *items = @[item1, item2];
NSDictionary *properties = @{
DFEventProperty.TOTAL_PURCHASE_AMOUNT: @2,
DFEventProperty.ORDER_ID: @"a0b1c211",
DFEventProperty.PAYMENT_METHOD: @"credit_card",
DFEventProperty.DELIVERY_CHARGE: @0.0,
DFEventProperty.DISCOUNT: @0.0,
DFEventProperty.ITEMS: items
};
[[Dfinery shared] logEvent:DFEvent.PURCHASE properties: properties];
표준 이벤트 & 상품 속성
표준 이벤트와 표준 이벤트 속성, 상품 속성은 아래와 같습니다. 이벤트 이름으로도 사용가능합니다.
표준 이벤트
표준 이벤트의 이벤트와 이벤트 속성 이름의 경우 다음과 같이 사전 정의된 정적 상수로 제공됩니다.
DFEvent.LOGIN
df_login
로그인
DFEvent.LOGOUT
df_logout
로그아웃
DFEvent.SIGN_UP
df_sign_up
회원가입
DFEvent.PURCHASE
df_purchase
구매
DFEvent.VIEW_HOME
df_view_home
홈 화면 조회
DFEvent.VIEW_PRODUCT_DETAILS
df_view_product_details
상품 상세보기
DFEvent.ADD_TO_CART
df_add_to_cart
장바구니 담기
DFEvent.ADD_TO_WISHLIST
df_add_to_wishlist
관심상품 추가
DFEvent.REFUND
df_refund
주문취소하기
DFEvent.VIEW_SEARCH_RESULT
df_view_search_result
상품 검색하기
DFEvent.SHARE_PRODUCT
df_share_product
상품 공유하기
DFEvent.VIEW_LIST
df_view_list
상품 목록 조회
DFEvent.VIEW_CART
df_view_cart
장바구니 조회
DFEvent.ADD_PAYMENT_INFO
df_add_payment_info
구매 정보 입력
DFEvent.REMOVE_CART
df_remove_cart
장바구니 삭제
표준 이벤트 속성
DFEventProperty.ITEMS
df_items
상품
DFEventProperty.TOTAL_REFUND_AMOUNT
df_total_refund_amount
환불(취소) 총액
DFEventProperty.ORDER_ID
df_order_id
주문 번호(ID)
DFEventProperty.DELIVERY_CHARGE
df_delivery_charge
배송료
DFEventProperty.PAYMENT_METHOD
df_payment_method
결제 방법
DFEventProperty.TOTAL_PURCHASE_AMOUNT
df_total_purchase_amount
주문 총액
DFEventProperty.SHARING_CHANNEL
df_sharing_channel
상품공유 채널
DFEventProperty.SIGN_CHANNEL
df_sign_channel
상품 할인가
DFEventProperty.KEYWORD
df_keyword
검색 키워드
상품 속성
DFEventProperty.ITEMS 내에 배열로 적재되는 상품에 대한 기 정의된 속성 값에 대한 정보입니다. ITEM_ID, ITEM_NAME, ITEM_PRICE, ITEM_QUANTITY, ITEM_DISCOUNT는 필수 값으로 반드시 포함해야 합니다.
DFEventProperty.ITEM_ID
df_item_id
String
상품 번호(ID)
✅
DFEventProperty.ITEM_NAME
df_item_name
String
상품 명
✅
DFEventProperty.ITEM_PRICE
df_price
Double
상품 단가
✅
DFEventProperty.ITEM_QUANTITY
df_quantity
Int
상품 수량
✅
DFEventProperty.ITEM_DISCOUNT
df_discount
Double
상품 할인가
✅
DFEventProperty.ITEM_CATEGORY1
df_category1
String
상품 카테고리1
DFEventProperty.ITEM_CATEGORY2
df_category2
String
상품 카테고리2
DFEventProperty.ITEM_CATEGORY3
df_category3
String
상품 카테고리3
DFEventProperty.ITEM_CATEGORY4
df_category4
String
상품 카테고리4
DFEventProperty.ITEM_CATEGORY5
df_category5
String
상품 카테고리5
df_start_session, df_end_session 이벤트는 SDK를 통해 자동으로 수집되므로 호출할 필요가 없습니다.
표준 이벤트 사용 예시
로그인
유저가 서비스에 회원으로 가입하는 동작을 나타내는 이벤트입니다.
Dfinery.shared().logEvent(DFEvent.LOGIN)
[[Dfinery shared] logEvent:DFEvent.LOGIN];
로그아웃
유저가 앱에서 로그아웃하는 동작을 나타내는 이벤트입니다.
Dfinery.shared().logEvent(DFEvent.LOGOUT)
[[Dfinery shared] logEvent:DFEvent.LOGOUT];
회원가입
유저가 회원으로 가입하는 동작을 나타내는 이벤트입니다.
Dfinery.shared().logEvent(
DFEvent.SIGN_UP,
properties: [DFEventProperty.SIGN_CHANNEL: "Apple"]
)
NSDictionary *signUpProperties = @{
@"DFEventProperty.SIGN_CHANNEL": @"Apple"
};
[[Dfinery shared] logEvent:@"DFEvent.SIGN_UP" properties:signUpProperties];
표준 이벤트 속성
DFEventProperty.SIGN_CHANNEL
String
회원가입 채널
✅
구매
유저가 상품이나 서비스를 구매하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
let properties: [String: Any] = [
DFEventProperty.TOTAL_PURCHASE_AMOUNT: 2,
DFEventProperty.ORDER_ID: "a001",
DFEventProperty.PAYMENT_METHOD: "credit_card",
DFEventProperty.DELIVERY_CHARGE: 0.0,
DFEventProperty.DISCOUNT: 0,
DFEventProperty.ITEMS: items
]
Dfinery.shared().logEvent(DFEvent.PURCHASE, properties: properties)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSDictionary *purchaseProperties = @{
@"DFEventProperty.TOTAL_PURCHASE_AMOUNT": @2,
@"DFEventProperty.ORDER_ID": @"a001",
@"DFEventProperty.PAYMENT_METHOD": @"credit_card",
@"DFEventProperty.DELIVERY_CHARGE": @0.0,
@"DFEventProperty.DISCOUNT": @0.0,
@"DFEventProperty.ITEMS": @[item1, item2]
};
[[Dfinery shared] logEvent:@"DFEvent.PURCHASE" properties:purchaseProperties];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
DFEventProperty.ORDER_ID
String
주문 번호(ID)
✅
DFEventProperty.PAYMENT_METHOD
String
결제 방법
✅
DFEventProperty.TOTAL_PURCHASE_AMOUNT
Double
주문 총액
✅
DFEventProperty.DELIVERY_CHARGE
Double
배송료
✅
DFEventProperty.DISCOUNT
Double
상품할인가
✅
홈 화면 조회
유저가 앱의 홈 화면을 조회하는 동작을 나타내는 이벤트입니다.
Dfinery.shared().logEvent(DFEvent.VIEW_HOME)
[[Dfinery shared] logEvent:DFEvent.VIEW_HOME];
상품 상세 보기
유저가 특정 상품의 상세 정보를 조회하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.VIEW_PRODUCT_DETAILS,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.VIEW_PRODUCT_DETAILS withProperties:@{
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
장바구니 담기
유저가 상품을 장바구니에 담는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.ADD_TO_CART,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.ADD_TO_CART withProperties:@{
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
관심 상품 추가
유저가 상품을 관심 목록에 추가하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.ADD_TO_WISHLIST,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.ADD_TO_WISHLIST withProperties:@{
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
주문 취소하기
유저가 구매한 주문을 취소하고 환불하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 1500000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
Dfinery.shared().logEvent(
DFEvent.REFUND,
properties: [
DFEventProperty.TOTAL_REFUND_AMOUNT: 1510000.0,
DFEventProperty.ITEMS: [item1, item2]
]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
NSDictionary *refundProperties = @{
@"DFEventProperty.TOTAL_REFUND_AMOUNT": @1510000.0,
@"DFEventProperty.ITEMS": items
};
[[Dfinery shared] logEvent:@"DFEvent.REFUND" properties:refundProperties];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
DFEventProperty.TOTAL_REFUND_AMOUNT
Double
환불(취소) 총액
✅
상품 검색하기
유저가 상품을 검색하여 결과를 확인하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.VIEW_SEARCH_RESULT,
properties: [
DFEventProperty.KEYWORD: "keyword",
DFEventProperty.ITEMS: items
]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.VIEW_SEARCH_RESULT withProperties:@{
DFEventProperty.KEYWORD: @"keyword",
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
DFEventProperty.KEYWORD
String
검색 키워드
✅
상품 공유하기
유저가 상품을 공유하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.SHARE_PRODUCT,
properties: [
DFEventProperty.SHARING_CHANNEL: "sharing_channel",
DFEventProperty.ITEMS: items
]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.SHARE_PRODUCT withProperties:@{
DFEventProperty.SHARING_CHANNEL: @"sharing_channel",
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
DFEventProperty.SHARING_CHANNEL
String
상품 공유 채널
✅
상품 목록 조회
유저가 상품 목록을 조회하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.VIEW_LIST,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.VIEW_LIST withProperties:@{
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
장바구니 조회
유저가 장바구니를 조회하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.VIEW_CART,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.VIEW_CART withProperties:@{
DFEventProperty.ITEMS: item
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
구매 정보 입력
유저가 구매 정보를 입력하는 동작을 나타내는 이벤트입니다.
Dfinery.shared().logEvent(DFEvent.ADD_PAYMENT_INFO)
[[Dfinery shared] logEvent:DFEvent.ADD_PAYMENT_INFO];
장바구니 삭제
유저가 장바구니에 담긴 상품을 제거하는 동작을 나타내는 이벤트입니다.
let item1: [String: Any] = [
DFEventProperty.ITEM_ID: "b1319000",
DFEventProperty.ITEM_NAME: "iPhone12",
DFEventProperty.ITEM_PRICE: 15000000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "apple"
]
let item2: [String: Any] = [
DFEventProperty.ITEM_ID: "a3219006",
DFEventProperty.ITEM_NAME: "Charger",
DFEventProperty.ITEM_PRICE: 10000.0,
DFEventProperty.ITEM_QUANTITY: 1,
DFEventProperty.ITEM_DISCOUNT: 0.0,
DFEventProperty.ITEM_CATEGORY1: "디지털",
DFEventProperty.ITEM_CATEGORY2: "가전",
DFEventProperty.ITEM_CATEGORY3: "전화기",
DFEventProperty.ITEM_CATEGORY4: "스마트폰",
DFEventProperty.ITEM_CATEGORY5: "액세서리"
]
let items = [item1, item2]
Dfinery.shared().logEvent(
DFEvent.REMOVE_CART,
properties: [DFEventProperty.ITEMS: items]
)
NSDictionary *item1 = @{
@"DFEventProperty.ITEM_ID": @"b1319000",
@"DFEventProperty.ITEM_NAME": @"iPhone12",
@"DFEventProperty.ITEM_PRICE": @1500000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"apple"
};
NSDictionary *item2 = @{
@"DFEventProperty.ITEM_ID": @"a3219006",
@"DFEventProperty.ITEM_NAME": @"Charger",
@"DFEventProperty.ITEM_PRICE": @10000.0,
@"DFEventProperty.ITEM_QUANTITY": @1,
@"DFEventProperty.ITEM_DISCOUNT": @0.0,
@"DFEventProperty.ITEM_CATEGORY1": @"디지털",
@"DFEventProperty.ITEM_CATEGORY2": @"가전",
@"DFEventProperty.ITEM_CATEGORY3": @"전화기",
@"DFEventProperty.ITEM_CATEGORY4": @"스마트폰",
@"DFEventProperty.ITEM_CATEGORY5": @"액세서리"
};
NSArray<NSDictionary *> *items = @[item1, item2];
[[Dfinery shared] logEvent:DFEvent.REMOVE_CART withProperties:@{
DFEventProperty.ITEMS: items
}];
표준 이벤트 속성
DFEventProperty.ITEMS
Array
✅
커스텀 이벤트
DFINERY에서 미리 정의되지 않은, DFINERY 콘솔에서 생성한 커스텀 이벤트 호출 예시입니다.
이벤트 호출 전 반드시 콘솔에 설정한 이벤트 이름, 속성과 데이터 타입이 일치하는지 확인해주세요.
이벤트 속성이 없는 경우
Dfinery.shared().logEvent("YOUR_CUSTOM_EVENT")
이벤트 속성이 있는 경우
Dfinery.shared().logEvent(
"CUSTOM_EVENT_WITH_PROPS",
properties: [
"count": 42,
"name": "jimmy"
]
)
이벤트 속성이 없는 경우
[[Dfinery shared] logEvent:@"YOUR_CUSTOM_EVENT"];
이벤트 속성이 있는 경우
[[Dfinery shared] logEvent:@"CUSTOM_EVENT_WITH_PROPS" withProperties:@{
@"count": @42,
@"name": @"jimmy"
}];
Last updated