Chat SDK 내에서 발생하는 사용자 행동을 추적하는 방법은 무엇인가요?

채팅 설정

Chat SDK 내부에서 발생하는 사용자 작업을 추적하는 방법

Chat 모바일 SDK를 사용하면 사용자 작업 및 관련 메타 속성을 수신할 수 있습니다. 이 기능은 다음 SDK 버전부터 사용할 수 있습니다. Android: 2.7.0+, iOS: 2.7.0+. 플랫폼에 따라 사용자 이벤트를 다음과 같이 수신할 수 있습니다.

Android:

사용자 이벤트 등록

Application 클래스의 onCreate에서 이를 등록하는 것을 권장합니다.

IntentFilter userActionsIntentFilter = new IntentFilter(Freshchat.FRESHCHAT_EVENTS);
getLocalBroadcastManager().registerReceiver(receiver, userActionsIntentFilter);
BroadcastReceiver receiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent == null || intent.getExtras() == null) {
            return;
        }
        Event event = Freshchat.getEventFromBundle(intent.getExtras());
        if (event != null) {
            Log.d("Name", "Name : " + event.getEventName().getName());
            Log.d("Prop", "Event Properties: " + event.getProperties());
        }
    }
};

사용자 이벤트 등록 해제

Application 클래스의 onTerminate에서 등록 해제할 수 있습니다.

getLocalBroadcastManager().unregisterReceiver(receiver);

참고: '사용자 이벤트 추적'에 대한 비디오를 여기에서 확인할 수 있습니다: https://freshchat.wistia.com/medias/cmgpce0usa

iOS:

Objective C

사용자 이벤트 등록

[[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(userActionEvent:)
                                                 name:FRESHCHAT_EVENTS
                                               object:nil];

- (void) userActionEvent:(NSNotification *)notif {
    FreshchatEvent *fcEvent = notif.userInfo[@"event"];
    // Check with available event enum
    if (fcEvent.name == FCEventFAQOpen){
        // Log existing event meta / properties
        NSLog(@"Event properties - %@",fcEvent.properties);
    }
}

사용자 이벤트 등록 해제

[[NSNotificationCenter defaultCenter]removeObserver: FRESHCHAT_EVENTS];

Swift

사용자 이벤트 등록

NotificationCenter.default.addObserver(self,selector: #selector(userActionEvent(_:)),name: NSNotification.Name(rawValue: FRESHCHAT_EVENTS),object: nil)

func userActionEvent(_ notification: Notification)
{
    var fcEvent : FreshchatEvent? = nil
    fcEvent = (notification.userInfo?["event"] as? FreshchatEvent)
    //Check with available event enum
    if fcEvent?.name == FCEventFAQOpen {
        //Log existing event meta / properties
        print ("Event properties - \(String(describing: fcEvent?.properties))")
    }
}

사용자 이벤트 등록 해제

NotificationCenter.default.removeObserver(FRESHCHAT_EVENTS)

지원되는 이벤트:

이벤트 이름 설명
FCEventFAQCategoryListOpen FAQ 카테고리 목록이 열릴 때
FCEventFAQListOpen FAQ 목록이 열릴 때
FCEventFAQOpen FAQ가 열릴 때
FCEventFAQSearch FAQ가 검색 결과에서 선택되거나 검색 결과가 취소될 때
FCEventFAQVote FAQ에 투표할 때
FCEventChannelListOpen 채널 목록이 열릴 때
FCEventMessageSent 사용자 메시지가 전송될 때
FCEventConversationOpen 채널이 열릴 때
FCEventCsatOpen 사용자에게 CSAT가 표시될 때
FCEventCsatSubmit 사용자가 CSAT에 응답할 때
FCEventCsatExpiry CSAT가 만료되어 사용자에게 표시되지 않을 때
FCEventLinkTap 사용자가 외부 링크를 클릭할 때
FCEventScreenView Chat SDK 화면이 사용자에게 표시될 때
FCEventMessageReceive 사용자가 메시지를 받을 때
FCEventNotificationReceive 사용자가 채팅 알림을 받을 때
FCEventIdTokenStatusChange 사용자의 JWT 토큰 상태가 변경될 때
FCEventDropDownShow 드롭다운 메시지가 사용자에게 표시될 때
FCEventDropDownOptionSelect 사용자가 드롭다운 옵션을 선택할 때
FCEventCarouselShow 캐러셀 메시지가 사용자에게 표시될 때
FCEventCarouselOptionSelect 사용자가 캐러셀 옵션을 선택할 때
FCEventCarouselOptionView 사용자가 캐러셀 보기 버튼을 클릭할 때
FCEventCalendarFindTimeSlotClick 사용자가 시간 슬롯 찾기 버튼을 클릭할 때
FCEventCalendarInviteCancel 사용자가 회의 초대를 취소할 때
FCEventCalendarNoTimeSlotFound 사용 가능한 회의 초대가 없을 때
FCEventCalendarBookingSuccess 사용자가 회의를 성공적으로 예약할 때
FCEventCalendarBookingRetry 사용자가 회의 예약을 재시도할 때
FCEventCalendarBookingFailure 사용자의 회의 예약이 실패할 때

이 문서가 도움이 되었나요?

Freshdesk Omni AI 도우미

Chat SDK 내에서 발생하는 사용자 행동을 추적하는 방법은 무엇인가요?

AI 어시스턴트 초기화 중...

문서만으로 해결되지 않는 부분이 있다면

ACENT Flow로 고객지원 운영을 어떻게 바꿀 수 있는지 살펴보시거나, 상황을 알려주시면 담당자가 직접 안내드리겠습니다.