Skip to content
Store Dev
Last Updated

Writing Log Submission Scripts

81plug Log Submission Script URLs by Environment

Include the 81plug log submission script on each page.

EnvironmentScript
Gate8<script src="//dvudc0gwzz5wc.cloudfront.net/v3.1/sandbox/svc_81plug.min.js"></script>
Live<script src="//dvudc0gwzz5wc.cloudfront.net/v3.1/live/svc_81plug.min.js"></script>

Defining Each Area

1. Define the common area.

text
var identity_info = { /* Define common fields. */ };
svcLog.identity(identity_info);
  • See the common area definition example below.

2. Define the action area and send the log.

For click

  • Send a click log.
text
var action_info = { /* Define action fields. */ };
svcLog.click(action_info, event);   // Send the log.
  • See the click action type in the action area definition example below.
  • event is the event object received when the click occurs.

For view

  • Send a view log.
text
var action_info = { /* Define action fields. */ };
svcLog.click(action_info, event);   // Send the log.
  • See the view action type in the action area definition example below.

For a custom action area

  • Send a custom action log.
text
var action_info = { /* Define action fields. */ };
var custom_action_info = { /* Define custom action fields. */ };
svcLog.action(action_info,  custom_action_info, event);     // Send the log.
  • See the custom action in the action area definition example below.
  • event is the event object received when the event occurs.

Sample

Common Area Definition Example

  • onstove log example
  • Example object to pass to svcLog.identity.
json
{
    "log_source_type": "pcweb",
    "app_id":"stove",
    "channeling_cd":"SO",
    "member_no":"191797967",
    "country":"KR",
    "locale":"ko"
 }

Action Area Definition Examples

When action_type is click

  • onstove click log example
json
{
    "action_type": "click",
    "action_param": {
        "service": "main",
        "click_type": "other",
        "click_area": "game_curation_thum",
        "click_sarea": "tab_button",
        "click_item": {
            "game_no": "45"
        },
        "position_scrolltop": 0,
        "position_scrollleft": 0,
        "position_x": 67,
        "position_y": 442
    },
    "current_url": "https://www.onstove.com/",
    "extra_data": {
        "query": {},
        "params": {},
        "full_path": ""
    }
}
  • Sent when a user performs a click action.
  • Example object to pass to svcLog.click.

Scope and Policy

  • action_info.action_param.click_area
    • Defines the web service's click feature area (major category).
    • Defines the category scope.
    • Identifies a service area; define it so logs do not overlap within the service.
  • action_info.action_param.click_sarea
    • Defines the web service's click feature area (subcategory).
    • Defines individual features within a category.
    • Identifies a service area; define it so logs do not overlap within the service.
  • action_info.action_param.click_item
    • Use this to collect additional information through click logs.
    • Define it when service-specific logs are needed; it can reflect the service's characteristics.
    • Defines the log types to aggregate through this click feature.\
      • Confirm implementation requirements with the team developing the logs.

When action_type is view

  • onstove view log example
  • Number of times users open a website within STOVE services.
  • Example object to pass to svcLog.view.
json
{
    "action_type": "view",
    "action_param": {
        "view_type": "view_frame",
        "base_url": "",
        "from_url": "",
        "view_id": "2534dc46-864d-c80c-d5ae-10ed4d1b1c3d",
        "view_area": "integrated_banner",
        "service": "main",
        "view_info": {
            "integrated_banner": {
                "component_no": 1,
                "banner_no": 6
            }
        },
        "position_scrolltop": 0,
        "position_scrollleft": 0
    },
    "current_url": "https://www.onstove.com/",
    "extra_data": {
        "query": {},
        "params": {},
        "full_path": "https://www.onstove.com/"
    }
}

Scope and Policy

  • action_info.action_param.view_area
    • Defines the web service screen visited by the user.
    • view_area must be unique within a service.
  • action_info.action_param.view_type
    • pageView
      • When a page opens in the web service.
      • Pages displayed when switching between service screens.
    • view_frame
      • When you need to track views of a specific area.
      • When a service element behaves like a view but is not a pageView and needs separate aggregation.
        • Examples:
          • Popup: define popups as view_frame rather than pageView.
          • Component: define each component area as view_frame.
          • Define layer popups as view_frame.
          • These areas must use view_frame for separate aggregation.
          • These areas must not affect pageView totals.
  • action_info.action_param.view_info
    • Use this to obtain additional information through view logs.
    • Use this for service-specific logging; definitions can reflect the service's characteristics.
    • Defines the log types to aggregate through this view feature.
      • Use view_info for service-specific metrics and define it in consultation with the person responsible. Examples: board_seq, article_id, room_no.

For a Custom Action Area

  • Properties such as action_type, action_category1, and action_category2 for custom actions (custom_action_type) have no predefined values and can be defined according to the planner's intent.
CodeDescription
action_typeCustom action type
action_category1Action category (parent)
action_category2Action category (child)
action_simple_valueAction value
action_paramAction parameter data

Example 1: custom_action_type is tutorial

json
{
    "action_type":"tutorial",
    "action_category1":"tutorial00.view",
    "action_category2":"",
    "action_simple_value":1,
    "action_param":{"a" : "b" …}
}

Example 2: custom_action_type is signin

json
{
    "action_type":"stoveapp.auth",
    "action_category1":"terms.view",
    "action_category2":"2", // Game code (TR)
    "action_simple_value":10,
    "action_param":{"a" : "b" …}
}

Integration Script Sample

text
// Integrating the visit action_type on mobile web.
// Insert the following code into the web page. Sample for the live environment.
<script src="//dvudc0gwzz5wc.cloudfront.net/v3.1/live/svc_81plug.min.js"></script> 
<script>
// Common area (user information)
var identity_info = {
    "log_source_type": "pcweb",
    "app_id":"stove",
    "channeling_cd":"SO",
    "member_no":"191797967",
    "country":"KR",
    "locale":"ko"
 }

// Standard action information: click
var action_info = {
    "action_type": "click",
    "action_param": {
        "service": "main",
        "click_type": "other",
        "click_area": "game_curation_thum",
        "click_sarea": "tab_button",
        "click_item": {
            "game_no": "45"
        },
        "position_scrolltop": 0,
        "position_scrollleft": 0,
        "position_x": 67,
        "position_y": 442
    },
    "current_url": "https://www.onstove.com/",
    "extra_data": {
        "query": {},
        "params": {},
        "full_path": ""
    }
}


// Standard action information: view
/*
var action_info = {
    "action_type": "view",
    "action_param": {
        "view_type": "view_frame",
        "base_url": "",
        "from_url": "",
        "view_id": "2534dc46-864d-c80c-d5ae-10ed4d1b1c3d",
        "view_area": "integrated_banner",
        "service": "main",
        "view_info": {
            "integrated_banner": {
                "component_no": 1,
                "banner_no": 6
            }
        },
        "position_scrolltop": 0,
        "position_scrollleft": 0
    },
    "current_url": "https://www.onstove.com/",
    "extra_data": {
        "query": {},
        "params": {},
        "full_path": "https://www.onstove.com/"
    }
}
*/


// Custom action information: custom_action_type is tutorial
var custom_action_info = {
    "action_type":"tutorial",
    "action_category1":"tutorial00.view",
    "action_category2":"",
    "action_simple_value":1,
    "action_param":{"a" : "b" …}
}

// Custom action information: custom_action_type is signin
/*
var custom_action_info = {
    "action_type":"stoveapp.auth",
    "action_category1":"terms.view",
    "action_category2":"2", // Game code (TR)
    "action_simple_value":10,
    "action_param":{"a" : "b" …}
}     
*/
    svcLog.identity(identity_info);.
    svcLog.action(action_info, custom_action_info , event);    // send log, event = event object
</script>

Contact Us


If you have any questions, please contact us on Discord or by email at store.support@smilegate.com.