stat.trackEvent - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.stat.trackEvent

API ์„ค๋ช…

  • Event Tracking API
  • Tracking ํ•˜๊ณ ์ž ํ•˜๋Š” Event๋ฅผ ์„ค์ •

API ๊ตฌ์กฐ

  • function trackEvent(options,callback)
  • ํ•ด๋‹น api์˜ options ๊ฐ’์€ ์˜๋ฌธ์„ ์‚ฌ์šฉํ•˜๋„๋ก ๊ถŒ๊ณ ํ•œ๋‹ค.
  • options
    • eventTime: (String, Mandatory) ์ด๋ฒคํŠธ ๊ธฐ๋ก ์‹œ๊ฐ„(ํด๋ผ์ด์–ธํŠธ ์ชฝ)์ด๋ฉฐ, ํ˜•์‹์€ YYYYMMdd24hhmmssSSSS์„ ๋”ฐ๋ฆ„(ex-201802071243000000)
    • eventName: (String, Mandatory) ์ด๋ฒคํŠธ ์ด๋ฆ„
    • eventCategory: (String, Mandatory) ์ด๋ฒคํŠธ ๋ถ„๋ฅ˜ ์ฝ”๋“œ
    • eventAdditionalInfo: (JSONArray, Optional) ์ด๋ฒคํŠธ์˜ ์ถ”๊ฐ€ ์ •๋ณด๋กœ ๋‹ค์Œ์˜ JSON ๊ฐ์ฒด๋“ค๋กœ ๊ตฌ์„ฑ๋˜์–ด์•ผ ํ•จ
      • name: ์ถ”๊ฐ€์ •๋ณด key ์ด๋ฆ„
      • value: ์ถ”๊ฐ€ ์ •๋ณด value
    • eventWeight: (Number, Optional) ์ด๋ฒคํŠธ ๊ฐ€์ค‘์น˜ ๊ฐ’์œผ๋กœ ๊ธฐ๋ณธ ์„ค์ • ๊ฐ’์€ 100์ž„
  • result_cd
    • 200: ์„ฑ๊ณต
    • 500: ์‹œ์Šคํ…œ Error
  • extra
    • null

์‚ฌ์šฉ ์˜ˆ์‹œ

// callback
var options = {}
options.eventTime = "202005250947230000";
options.eventName = "view";
options.eventCategory = "media";
options.eventAdditionalInfo = [{
    name: "mediaId", value: "MEDIA_ID_1234123"
    name: "startTime", value: "202005250947230000"
}];
options.eventWeight = 100;

gigagenie.stat.trackEvent(options, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        console.log("trackEvent Success");
    }
});