영상 시청 프로그레스 트래킹

    영상 시청 프로그레스 트래킹


    기사 요약

    이 페이지는 messageCallbackEVENT_LOG을 사용하여 비디오 진행 관련 이벤트를 수신하는 방법에 대해 안내합니다.

    1. 비디오 플레이어는 ON_PLAYER_STARTED로 시작됩니다.

    2. 시청 시간은 EVENT_LOG를 통해 추적할 수 있으며, 속성 이름은 player_active_seconds입니다.

    ON_PLAYER_STARTED

    var messageCallback = {
      ON_PLAYER_STARTED: (payload)=> {
            //immediately fired once user getting into the player
            console.log('ON_PLAYER_STARTED',payload)
          },
      EVENT_LOG: (payload) => {
            // console.log("event log fired", payload.name);
            // console.log("payload", payload);
            
            switch (payload.name) {
              case "player_on_foreground":
                //player came to foreground and active
                console.log("player_on_foreground",payload);
                break;
              case "player_on_background":
                //player went to background
                console.log("player_on_background",payload);
                break;
              case "player_active_seconds":
                //this event fired every payload.parameter.interval milliseconds. typically per 3seconds. 
                //you can track video progress by either activatedDuration or videoCurrentTime upon your needs
                console.log("player_active_seconds",payload);
                break;
            }
            
          },
    }

    Payload (ON_PLAYER_STARTED)

    Property name

    Type

    Description

    ak

    string

    Accesskey

    ck

    string

    campaignKey

    isPreview

    boolean

    Preview인지 여부

    Payload (EVENT_LOG)

    Property name

    Type

    Description

    name

    string

    Name of event

    feature

    "click" | "action" | “show”

    Type of event

    parameter

    JSON

    Reference object of the event

    campaignKey

    string

    Unique Key of campaign


    Video Progress 관련 이벤트

    이벤트 전체 목록(사용자 행동 추적하기 - events)도 참고해주세요.

    Event name

    Feature

    Parameter

    Description

    player_on_foreground

    show

    {

       "activatedAt": Number,

       "activatedDuration": Number,

       "mode": String,

       "videoCurrentTime": Number

    }

    플레이어가 전면에 표시됨

    • activatedAt: 플레이어 활성화의 타임스탬프

    • activatedDuration: 플레이어 활성 기간

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: Timestamp of current playback time

    player_on_background

    show

    {

       "activatedAt": Number,

       "activatedDuration": Number,

       "mode": String,

       "videoCurrentTime": Number

    }

    플레이어가 백그라운드로 전환됨

    • activatedAt: 플레이어 활성화의 타임스탬프

    • activatedDuration: 플레이어 활성 기간

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: 현재 재생 시간의 타임스탬프

    player_active_seconds

    show

    {

       "activatedAt": Number,

       "activatedDuration": Number,

       "interval": Number,

       "mode": String,

       "videoCurrentTime": Number

    }

    플레이어가 활성 상태일 경우에 주기적으로 호출됨

    • activatedAt: 플레이어 활성화의 타임스탬프

    • activatedDuration: 플레이어 활성 기간

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: 현재 재생 시간의 타임스탬프

    • Interval: 주기적인 호출의 간격