개발자 가이드
사용자 가이드개발자 가이드API 가이드🏠
한국어
한국어
  • 홈
  • 공통
    • 통합 ID 연동 시나리오
    • 상수
    • FAQ
  • 플랫폼 별 가이드
    • Android
      • 연동하기
      • 이벤트
      • 유저 식별 정보 설정
      • 유저 프로필 설정
      • 액션
        • 푸시
        • 인앱메시지
        • 알림톡
        • 문자
      • 개인 정보 보호
        • 개인 정보 보호 지원
        • Google Play의 데이터 공개 요건 준비
      • 릴리즈 노트
    • iOS
      • 연동하기
      • 이벤트
      • 유저 식별 정보 설정
      • 유저 프로필 설정
      • 액션
        • 푸시
        • 인앱메시지
        • 알림톡
        • 문자
      • 릴리즈 노트
    • Hybrid App
      • 연동하기
    • Web
      • 연동하기
      • 이벤트
      • 유저 식별 정보 설정
      • 유저 프로필 설정
      • 액션
        • 인앱메시지
        • 알림톡
        • 문자
      • 고급 사용 사례
        • 부가 설정
      • 릴리즈 노트
Powered by GitBook
On this page
  • 시작하기 전에
  • 유의사항
  • 이벤트 기록
  • 이벤트 기록 예시
  • 표준 이벤트 및 속성
  • 표준 이벤트
  • 표준 이벤트 속성
  • 상품 속성
  • 표준 이벤트 사용 예시
  • 로그인
  • 로그아웃
  • 회원가입
  • 구매
  • 홈 화면 조회
  • 상품 상세 보기
  • 장바구니 담기
  • 관심 상품 추가
  • 주문 취소하기
  • 상품 검색하기
  • 상품 공유하기
  • 상품 목록 조회
  • 장바구니 조회
  • 구매 정보 입력
  • 장바구니 삭제
  • 커스텀 이벤트
  • 날짜 및 시간 형식 속성 입력하기
  1. 플랫폼 별 가이드
  2. Android

이벤트

Previous연동하기Next유저 식별 정보 설정

Last updated 2 months ago

이 문서는 DFINERY SDK를 사용하여 유저의 동작을 분석하기 위해 수행해야 할 작업에 대해 설명합니다. 이를 사용하기 위해서는 이 선행되어야 합니다.

시작하기 전에

이벤트를 연동하기 전에 에서 이벤트 등록을 하세요. 이벤트 등록은 콘솔의 부가 설정 > 데이터 연동 > 이벤트 관리 > 이벤트 목록 페이지로 이동한 뒤 이벤트 생성 버튼을 눌러 표준 및 커스텀 이벤트를 생성할 수 있습니다.

유의사항

  • 등록되지 않은 이벤트 또는 이벤트 속성이 입력될 경우 이벤트가 기록되지 않습니다.

  • 입력한 이벤트 속성의 타입과 이벤트 속성 타입이 맞지 않을 경우 이벤트가 기록되지 않습니다.

  • 이벤트에 필수로 입력되어야 하는 이벤트 속성이 누락될 경우 이벤트가 기록되지 않습니다.

  • 은 한 이벤트에 최대 100개까지 입력 가능합니다.

이벤트 기록

logEvent 메소드를 사용하여 유저의 이벤트를 기록합니다. 는 상수를 제공합니다.

void logEvent(String eventName)
void logEvent(String eventName, JSONObject properties)

각각의 매개변수는 다음을 의미합니다.

  • eventName : 이벤트 이름

  • properties : 이벤트 속성

이벤트 기록 예시

// 속성이 없을 경우
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP);

// 속성이 있을 경우
JSONObject properties = new JSONObject();
properties.put(DFEventProperty.SHARING_CHANNEL, "Kakao");
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, properties);
// 속성이 없을 경우
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP)

// 속성이 있을 경우
val properties = JSONObject()
properties.put(DFEventProperty.SHARING_CHANNEL, "Kakao")
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, 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

Number

상품 단가

✅

DFEventProperty.ITEM_QUANTITY

df_quantity

Number

상품 수량

✅

DFEventProperty.ITEM_DISCOUNT

df_discount

Number

상품 할인가

✅

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

표준 이벤트 사용 예시

로그인

유저가 서비스에 회원으로 가입하는 동작을 나타내는 이벤트입니다.

Dfinery.getInstance().logEvent(DFEvent.LOGIN);
Dfinery.getInstance().logEvent(DFEvent.LOGIN)

로그아웃

유저가 앱에서 로그아웃하는 동작을 나타내는 이벤트입니다.

Dfinery.getInstance().logEvent(DFEvent.LOGOUT);
Dfinery.getInstance().logEvent(DFEvent.LOGOUT)

회원가입

유저가 회원으로 가입하는 동작을 나타내는 이벤트입니다.

JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.SIGN_CHANNEL, "Kakao");
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, properties);
val properties = JSONObject()
try {
    properties.put(DFEventProperty.SIGN_CHANNEL, "Kakao")
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.SIGN_CHANNEL

String

회원가입 채널

✅

구매

유저가 상품이나 서비스를 구매하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
    properties.put(DFEventProperty.ORDER_ID, "상품번호");
    properties.put(DFEventProperty.PAYMENT_METHOD, "BankTransfer");
    properties.put(DFEventProperty.TOTAL_PURCHASE_AMOUNT, 25500.0);
    properties.put(DFEventProperty.DELIVERY_CHARGE, 3000.0);
    properties.put(DFEventProperty.DISCOUNT, 0);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.PURCHASE, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
    properties.put(DFEventProperty.ORDER_ID, "상품번호")
    properties.put(DFEventProperty.PAYMENT_METHOD, "BankTransfer")
    properties.put(DFEventProperty.TOTAL_PURCHASE_AMOUNT, 25500.0)
    properties.put(DFEventProperty.DELIVERY_CHARGE, 3000.0)
    properties.put(DFEventProperty.ITEM_DISCOUNT, 0)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.PURCHASE, properties)

표준 이벤트 속성

이름
타입
설명
필수

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.getInstance().logEvent(DFEvent.VIEW_HOME);
Dfinery.getInstance().logEvent(DFEvent.VIEW_HOME)

상품 상세 보기

유저가 특정 상품의 상세 정보를 조회하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_PRODUCT_DETAILS, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_PRODUCT_DETAILS, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

장바구니 담기

유저가 상품을 장바구니에 담는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.ADD_TO_CART, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.ADD_TO_CART, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

관심 상품 추가

유저가 상품을 관심 목록에 추가하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.ADD_TO_WISHLIST, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.ADD_TO_WISHLIST, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

주문 취소하기

유저가 구매한 주문을 취소하고 환불하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
    properties.put(DFEventProperty.TOTAL_REFUND_AMOUNT, 22500.0);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.REFUND, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
    properties.put(DFEventProperty.TOTAL_REFUND_AMOUNT, 22500.0)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.REFUND, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

DFEventProperty.TOTAL_REFUND_AMOUNT

Double

환불(취소) 총액

✅

상품 검색하기

유저가 상품을 검색하여 결과를 확인하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
    properties.put(DFEventProperty.KEYWORD, "삼겹살");
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_SEARCH_RESULT, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
    properties.put(DFEventProperty.KEYWORD, "삼겹살")
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_SEARCH_RESULT, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

DFEventProperty.KEYWORD

String

검색 키워드

✅

상품 공유하기

유저가 상품을 공유하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
    properties.put(DFEventProperty.SHARING_CHANNEL, "Facebook");
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.SHARE_PRODUCT, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
    properties.put(DFEventProperty.SHARING_CHANNEL, "Facebook")
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.SHARE_PRODUCT, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

DFEventProperty.SHARING_CHANNEL

String

상품 공유 채널

✅

상품 목록 조회

유저가 상품 목록을 조회하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_LIST, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_LIST, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

장바구니 조회

유저가 장바구니를 조회하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_CART, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.VIEW_CART, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

구매 정보 입력

유저가 구매 정보를 입력하는 동작을 나타내는 이벤트입니다.

Dfinery.getInstance().logEvent(DFEvent.ADD_PAYMENT_INFO);
Dfinery.getInstance().logEvent(DFEvent.ADD_PAYMENT_INFO)

장바구니 삭제

유저가 장바구니에 담긴 상품을 제거하는 동작을 나타내는 이벤트입니다.

JSONObject item = new JSONObject();
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호");
    item.put(DFEventProperty.ITEM_NAME, "상품이름");
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품");
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자");
    item.put(DFEventProperty.ITEM_PRICE, 5000.0);
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0);
    item.put(DFEventProperty.ITEM_QUANTITY, 5L);
} catch (JSONException e) {
    e.printStackTrace();
}
JSONArray items = new JSONArray();
items.put(item);
JSONObject properties = new JSONObject();
try {
    properties.put(DFEventProperty.ITEMS, items);
} catch (JSONException e) {
    e.printStackTrace();
}
Dfinery.getInstance().logEvent(DFEvent.REMOVE_CART, properties);
val item = JSONObject()
try {
    item.put(DFEventProperty.ITEM_ID, "상품번호")
    item.put(DFEventProperty.ITEM_NAME, "상품이름")
    item.put(DFEventProperty.ITEM_CATEGORY1, "식품")
    item.put(DFEventProperty.ITEM_CATEGORY2, "과자")
    item.put(DFEventProperty.ITEM_PRICE, 5000.0)
    item.put(DFEventProperty.ITEM_DISCOUNT, 500.0)
    item.put(DFEventProperty.ITEM_QUANTITY, 5L)
} catch (e: JSONException) {
    e.printStackTrace()
}
val items = JSONArray()
items.put(item)
val properties = JSONObject()
try {
    properties.put(DFEventProperty.ITEMS, items)
} catch (e: JSONException) {
    e.printStackTrace()
}
Dfinery.getInstance().logEvent(DFEvent.REMOVE_CART, properties)

표준 이벤트 속성

이름
타입
설명
필수

DFEventProperty.ITEMS

Array

✅

커스텀 이벤트

사용자가 직접 임의의 이벤트 명칭과 속성을 입력하여 반영하는 이벤트입니다. 표준 이벤트에도 디파이너리 콘솔에서 커스텀 속성을 추가하여 사용할 수 있습니다.

속성이 없을 경우

Dfinery.getInstance().logEvent("CUSTOM_EVENT_NAME", null);
Dfinery.getInstance().logEvent("CUSTOM_EVENT_NAME", null)

속성이 있을 경우

JSONObject properties = new JSONObject();
properties.put("CUSTOM_PROPERTY_KEY", "CUSTOM_PROPERTY_VALUE");//사용자 정의 속성 값(Optional)
Dfinery.getInstance().logEvent("CUSTOM_EVENT_NAME", properties);
val properties = JSONObject()
properties.put("CUSTOM_PROPERTY_KEY", "CUSTOM_PROPERTY_VALUE")//사용자 정의 속성 값(Optional)
Dfinery.getInstance().logEvent("CUSTOM_EVENT_NAME", properties)

날짜 및 시간 형식 속성 입력하기

날짜 및 시간 형식은 yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 포맷의 문자열 형태로 입력해야합니다.

JSONObject properties = new JSONObject();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DFEventProperty.FORMAT_DATETIME, Locale.US);
Date currentDate = new Date();
try {
    properties.put("CUSTOM_PROPERTY_KEY", simpleDateFormat.format(currentDate));
} catch (JSONException e) {
    throw new RuntimeException(e);
}
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, properties);
val properties = JSONObject()
val simpleDateFormat = SimpleDateFormat(DFEventProperty.FORMAT_DATETIME, Locale.US)
val currentDate = Date()
try {
    properties.put("CUSTOM_PROPERTY_KEY", simpleDateFormat.format(currentDate))
} catch (e: JSONException) {
    throw RuntimeException(e)
}
Dfinery.getInstance().logEvent(DFEvent.SIGN_UP, properties)

로그인을 한 하면 통합 아이디에 정보가 반영되어 유저를 더 명확하게 식별할 수 있게 됩니다.

유저 식별 정보를 설정
SDK 연동
DFINERY 콘솔
상품
표준 이벤트
상품
상품
상품
상품
상품
상품
상품
상품
상품
상품