Tracking user behaviors (EventLog)

    Tracking user behaviors (EventLog)


    Article summary

    By defining the messageCallback like the below, you can track UI events occurring in the player.

    EVENT_LOG

    var messageCallback = {
      EVENT_LOG: function (payload) {
        console.log("Event name : " + payload.name);
        console.log("feature : " + payload.feature);
        console.log("parameter : " + payload.parameter);
        console.log("campaignKey : " + payload.campaignKey);
    
        switch(payload.name) {
          case 'like_button': 
            console.log("User clicks like button");
            break;
        }
      },
    }

    Payload

    Property name

    Type

    Description

    name

    string

    Name of event

    feature

    "click" | "action"

    Type of event

    parameter

    JSON

    Reference object of the event

    campaignKey

    string

    Unique Key of campaign


    Events

    Event name

    Feature

    Parameter

    Description

    back_button

    click

    Back button

    option_button

    click

    Button for option

    share_button

    click

    { "title": String }

    Button to share

    pip_button

    click

    PIP button

    coupon

    click

    Coupon

    product_list_button

    click

    Product button

    chat_button

    click

    Chatting button

    like_button

    click

    Like button

    hide_controls

    click

    Hide player components (When clicking the empty area of the player)

    show_controls

    click

    Show player components (When clicking the empty area of the player)

    hide_controls_accessibility

    click

    Hide controls for accessibility

    show_controls_accessibility

    click

    Show controls for accessibility

    mute_button

    click

    Mute button

    unmute_button

    click

    Unmute button

    quiz_question_show

    show

    { "quizType": String, "question": String }

    Quiz pop-up shown

    quiz_select

    action

    { "itemIndex": Number, "content": String }

    Select quiz answer

    quiz_answer_show

    show

    { "quizType": String, "question": String, "result": Bool }

    Quiz answer shown

    chat_send_button

    click

    Button to send a chatting

    video_display_resolution_change

    click

    {"resolution": String}

    Resolution button

    video_display_resolution_close

    click

    Resolution close button

    edit_nickname_close_button

    click

    Close button on the nickname editing layer

    edit_nickname_clear_button

    click

    Clear button on the nickname editing layer

    edit_nickname_save_button

    click

    Save button on the nickname editing layer

    product_list_banner

    click

    Product list banner

    product_list_show

    action

    Product list shown

    product_list_hide

    action

    Hiding the product list

    product_list_expand

    action

    Expanding the product list

    product_list_item

    click

    { "goodsId": String, "name": String, "sku": String }

    Product list - Clicking an item

    product_buy_button

    click

    { "goodsId": String, "name": String, "sku": String }

    Item detail - Buy button

    product_add_to_watchlist

    click

    { "goodsId": String, "name": String, "sku": String }

    Add to watchlist

    product_remove_from_watchlist

    click

    { "goodsId": String, "name": String, "sku": String }

    Remove from watchlist

    landscape_button

    click

    Landscape mode - landscape button

    portrait_button

    click

    Landscape mode - portrait button

    video_contract_button

    click

    Landscape mode - Landscape mode - show chatting/products UI

    video_expand_button

    click

    Landscape mode - expanding video

    video_muted

    action

    *SDK Only - Player muted

    video_unmuted

    action

    *SDK Only - Player unmuted

    swipe_pip_mode

    action

    *SDK Only - Enter PIP mode by swiping

    player_start

    action

    *SDK Only - Player started

    player_close

    action

    *SDK Only - Player closed

    audio_loss

    action

    *SDK Only - Audio focus lose

    audio_gain

    action

    *SDK Only - Audio focus gain

    pinch_zoom_in

    action

    *SDK Only - Landscape mode - two pinch zoom in

    pinch_zoom_out

    action

    *SDK Only - Landscape mode - two pinch zoom out

    player_on_foreground

    show

    { "activatedAt": Number,

    "activatedDuration": Number,

    "mode": String,

    "videoCurrentTime": Number }

    The player is shown in foreground.

    • activatedAt: Timestamp of player activation

    • activatedDuration: Duration of player-activated time

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: Timestamp of current playback time

    player_on_background

    show

    { "activatedAt": Number,

    "activatedDuration": Number,

    "mode": String,

    "videoCurrentTime": Number }

    The player went background.

    • activatedAt: Timestamp of player activation

    • activatedDuration: Duration of player-activated time

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: Timestamp of current playback time

    player_active_seconds

    show

    { "activatedAt": Number,

    "activatedDuration": Number,

    "interval": Number,

    "mode": String,

    "videoCurrentTime": Number }

    The heartbeat when player is active.

    • activatedAt: Timestamp of player activation

    • activatedDuration: Duration of player-activated time

    • interval: Time interval of this heartbeat

    • mode: 'LIVE' | 'REPLAY'

    • videoCurrentTime: Timestamp of current playback time