Entertainment : 엔터테인먼트
엔터테인먼트 앱에서 측정을 권장하는 인앱 이벤트 API와 적용 예시를 안내합니다.
트라이얼 완료
정식 구독이 아닌 트라이얼 구독이 완료되는 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_trial_complete");
eventMap.put("trial_method", "SKT 제휴");
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_trial_complete"
eventMap["trial_method"] = "SKT 제휴"
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_trial_complete"
event["trial_method"] = "SKT 제휴"
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_trial_complete" forKey:@"event"];
[event setValue:@"SKT 제휴" forKey:@"trial_method"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_trial_complete";
event["trial_method"] = "SKT 제휴";
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_trial_complete";
event["trial_method"] = "SKT 제휴";
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_trial_complete";
event["trial_method"] = "SKT 제휴";
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_trial_complete",
trial_method : "SKT 제휴"
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_trial_complete",
trial_method : "SKT 제휴"
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_trial_complete",
trial_method : "SKT 제휴"
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_trial_complete");
eventDic.Add("trial_method", "SKT 제휴");
DOT.logEvent(eventDic);
구독 완료
구독이 완료되는 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> purchaseMap = new HashMap<>();
purchaseMap.put("transaction_id", "SC87483");
purchaseMap.put("currency", "KRW");
purchaseMap.put("subscription_method", "신용카드");
Map<String, Object> productMap = new HashMap<>();
productMap.put("product_id", "FL828");
productMap.put("product_name", "모바일 무제한 듣기 정기결제");
productMap.put("quantity", 1);
productMap.put("revenue", 6900);
purchaseMap.put("product", productMap);
DOT.logPurchase(purchaseMap);
val purchaseMap = mutableMapOf<String,Any>()
purchaseMap["transaction_id"] = "SC87483"
purchaseMap["currency"] = "KRW"
purchaseMap["subscription_method"] = "신용카드"
val productMap = mutableMapOf<String,Any>()
productMap["product_id"] = "FL828"
productMap["product_name"] = "모바일 무제한 듣기 정기결제"
productMap["quantity"] = 1
productMap["revenue"] = 6900
purchaseMap["product"] = productMap
DOT.logPurchase(purchaseMap)
let purchase = NSMutableDictionary()
purchase["transaction_id"] = "SC87483"
purchase["currency"] = "KRW"
purchase["subscription_method"] = "신용카드"
var product : [String: Any] = [:]
product["product_id"] = "FL828"
product["product_name"] = "모바일 무제한 듣기 정기결제"
product["quantity"] = 1
product["revenue"] = 6900
purchase["product"] = product
DOT.logPurchase(purchase)
NSMutableDictionary *purchase = [[NSMutableDictionary alloc] init];
[purchase setValue:@"SC87483" forKey:@"transaction_id"];
[purchase setValue:@"KRW" forKey:@"currency"];
[purchase setValue:@"신용카드" forKey:@"subscription_method"];
NSMutableDictionary *product = [[NSMutableDictionary alloc] init];
[product setValue:@"FL828" forKey:@"product_id"];
[product setValue:@"모바일 무제한 듣기 정기결제" forKey:@"product_name"];
[product setValue:[NSNumber numberWithInt:1] forKey:@"quantity"];
[product setValue:[NSNumber numberWithInt:6900] forKey:@"revenue"];
[purchase setValue:product forKey:@"product"];
[DOT logPurchase:purchase];
var purchase = new Object();
purchase["transaction_id"] = "SC87483";
purchase["currency"] = "KRW";
purchase["subscription_method"] = "신용카드";
var product = new Object();
product["product_id"] = "FL828";
product["product_name"] = "모바일 무제한 듣기 정기결제";
product["quantity"] = 1;
product["revenue"] = 6900;
purchase["product"] = product;
DOT.logPurchase(purchase);
var purchase = new Object();
purchase["transaction_id"] = "SC87483";
purchase["currency"] = "KRW";
purchase["subscription_method"] = "신용카드";
var product = new Object();
product["product_id"] = "FL828";
product["product_name"] = "모바일 무제한 듣기 정기결제";
product["quantity"] = 1;
product["revenue"] = 6900;
purchase["product"] = product;
WDOT.logPurchase(purchase);
// .dart 에서 호출 할 때
Map purchase = {};
purchase["transaction_id"] = "SC87483";
purchase["currency"] = "KRW";
purchase["subscription_method"] = "신용카드";
Map product = {};
product["product_id"] = "FL828";
product["product_name"] = "모바일 무제한 듣기 정기결제";
product["quantity"] = 1;
product["revenue"] = 6900;
purchase["product"] = product;
DOT.logPurchase(purchase);
// webview 에서 호출 할 때
var purchase = new Object();
purchase["transaction_id"] = "SC87483";
purchase["currency"] = "KRW";
purchase["subscription_method"] = "신용카드";
var productArray = new Array();
for( var inx = 0; inx < purchaselist[구매목록].length; inx++){
var purchaseProduct = purchaselist[inx];
var product = new Object();
product["product_id"] = "FL828";
product["product_name"] = "모바일 무제한 듣기 정기결제";
product["quantity"] = 1;
product["revenue"] = 6900;
productArray.push(product);
purchase["product"] = productArray;
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logPurchase",
data: purchase
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logPurchase(JSON.stringify({
transaction_id : "SC87483",
currency : "KRW",
subscription_method : "신용카드",
product : {
product_id : "FL828",
product_name : "모바일 무제한 듣기 정기결제",
quantity : 1,
revenue : 6900
}
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logPurchase",
data : {
transaction_id : "SC87483",
currency : "KRW",
subscription_method : "신용카드",
product : {
product_id : "FL828",
product_name : "모바일 무제한 듣기 정기결제",
quantity : 1,
revenue : 6900
}
}
}));
Dictionary<string, object> purchase = new Dictionary<string, object>();
purchase.Add("transaction_id", "SC87483");
purchase.Add("currency", "KRW");
purchase.Add("subscription_method", "신용카드");
Dictionary<string, object> product = new Dictionary<string, object>();
product.Add("product_id", "FL828");
product.Add("product_name", "모바일 무제한 듣기 정기결제");
product.Add("quantity", 1);
product.Add("revenue", 6900);
List<Dictionary<string, object>> productList = new List<Dictionary<string, object>>();
productList.Add(product);
purchase.Add("product", productList);
DOT.logPurchase(purchase);
미디어 재생 시작 - 음악
음악이 재생되는 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_media_played");
eventMap.put("artist_id", "80049126");
eventMap.put("artist_name", "아이유 (IU)");
eventMap.put("media_id", "30598121");
eventMap.put("media_name", "밤편지");
eventMap.put("album_id", "20089092");
eventMap.put("album_name", "밤편지");
eventMap.put("genre_id", "3772");
eventMap.put("genre", "팝, 발라드");
eventMap.put("duration", 4.16);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_media_played"
eventMap["artist_id"] = "80049126"
eventMap["artist_name"] = "아이유 (IU)"
eventMap["media_id"] = "30598121"
eventMap["media_name"] = "밤편지"
eventMap["album_id"] = "20089092"
eventMap["album_name"] = "밤편지"
eventMap["genre_id"] = "3772"
eventMap["genre"] = "팝, 발라드"
eventMap["duration"] = 4.16
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_media_played"
event["artist_id"] = "80049126"
event["artist_name"] = "아이유 (IU)"
event["media_id"] = "30598121"
event["media_name"] = "밤편지"
event["album_id"] = "20089092"
event["album_name"] = "밤편지"
event["genre_id"] = "3772"
event["genre"] = "팝, 발라드"
event["duration"] = 4.16
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_media_played" forKey:@"event"];
[event setValue:@"80049126" forKey:@"artist_id"];
[event setValue:@"아이유 (IU)" forKey:@"artist_name"];
[event setValue:@"30598121" forKey:@"media_id"];
[event setValue:@"밤편지" forKey:@"media_name"];
[event setValue:@"20089092" forKey:@"album_id"];
[event setValue:@"밤편지" forKey:@"album_name"];
[event setValue:@"3772" forKey:@"genre_id"];
[event setValue:@"팝, 발라드" forKey:@"genre"];
[event setValue:[NSNumber numberWithInt:4.16] forKey:@"duration"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_media_played";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
event["duration"] = 4.16;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_media_played";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
event["duration"] = 4.16;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_media_played";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
event["duration"] = 4.16;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_media_played",
artist_id : "80049126",
artist_name : "아이유 (IU)",
media_id : "30598121",
media_name : "밤편지",
album_id : "20089092",
album_name : "밤편지",
genre_id : "3772",
genre : "팝, 발라드",
duration : 4.16
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_media_played",
artist_id : "80049126",
artist_name : "아이유 (IU)",
media_id : "30598121",
media_name : "밤편지",
album_id : "20089092",
album_name : "밤편지",
genre_id : "3772",
genre : "팝, 발라드",
duration : 4.16
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_media_played",
artist_id : "80049126",
artist_name : "아이유 (IU)",
media_id : "30598121",
media_name : "밤편지",
album_id : "20089092",
album_name : "밤편지",
genre_id : "3772",
genre : "팝, 발라드",
duration : 4.16
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_media_played");
eventDic.Add("artist_id", "80049126");
eventDic.Add("artist_name", "아이유 (IU)");
eventDic.Add("media_id", "30598121");
eventDic.Add("media_name", "밤편지");
eventDic.Add("album_id", "20089092");
eventDic.Add("album_name", "밤편지");
eventDic.Add("genre_id", "3772");
eventDic.Add("genre", "팝, 발라드");
eventDic.Add("duration", 4.16);
DOT.logEvent(eventDic);
미디어 정지 - 영화
영화가 재생 중 일시정지된 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_media_stopped");
eventMap.put("media_id", "tt0120737");
eventMap.put("media_name", "The Lord of the Rings: The Fellowship of the Ring");
eventMap.put("actor_id", "nm0000704");
eventMap.put("actor_name", "Elijah Wood");
eventMap.put("director_id", "nm0001392");
eventMap.put("director_name", "Peter Jackson");
eventMap.put("genre_id", "237");
eventMap.put("genre", "adventure");
eventMap.put("language", "English");
eventMap.put("duration", 178);
eventMap.put("time_played", 62.4);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_media_stopped"
eventMap["media_id"] = "tt0120737"
eventMap["media_name"] = "The Lord of the Rings: The Fellowship of the Ring"
eventMap["actor_id"] = "nm0000704"
eventMap["actor_name"] = "Elijah Wood"
eventMap["director_id"] = "nm0001392"
eventMap["director_name"] = "Peter Jackson"
eventMap["genre_id"] = "237"
eventMap["genre"] = "adventure"
eventMap["language"] = "English"
eventMap["duration"] = 178
eventMap["time_played"] = 62.4
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_media_stopped"
event["media_id"] = "tt0120737"
event["media_name"] = "The Lord of the Rings: The Fellowship of the Ring"
event["actor_id"] = "nm0000704"
event["actor_name"] = "Elijah Wood"
event["director_id"] = "nm0001392"
event["director_name"] = "Peter Jackson"
event["genre_id"] = "237"
event["genre"] = "adventure"
event["language"] = "English"
event["duration"] = 178
event["time_played"] = 62.4
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_media_stopped" forKey:@"event"];
[event setValue:@"tt0120737" forKey:@"media_id"];
[event setValue:@"The Lord of the Rings: The Fellowship of the Ring" forKey:@"media_name"];
[event setValue:@"nm0000704" forKey:@"actor_id"];
[event setValue:@"Elijah Wood" forKey:@"actor_name"];
[event setValue:@"nm0001392" forKey:@"director_id"];
[event setValue:@"Peter Jackson" forKey:@"director_name"];
[event setValue:@"237" forKey:@"genre_id"];
[event setValue:@"adventure" forKey:@"genre"];
[event setValue:@"English" forKey:@"language"];
[event setValue:[NSNumber numberWithInt:178] forKey:@"duration"];
[event setValue:[NSNumber numberWithInt:62.4] forKey:@"time_played"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_media_stopped";
event["media_id"] = "tt0120737";
event["media_name"] = "The Lord of the Rings: The Fellowship of the Ring";
event["actor_id"] = "nm0000704";
event["actor_name"] = "Elijah Wood";
event["director_id"] = "nm0001392";
event["director_name"] = "Peter Jackson";
event["genre_id"] = "237";
event["genre"] = "adventure";
event["language"] = "English";
event["duration"] = 178;
event["time_played"] = 62.4;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_media_stopped";
event["media_id"] = "tt0120737";
event["media_name"] = "The Lord of the Rings: The Fellowship of the Ring";
event["actor_id"] = "nm0000704";
event["actor_name"] = "Elijah Wood";
event["director_id"] = "nm0001392";
event["director_name"] = "Peter Jackson";
event["genre_id"] = "237";
event["genre"] = "adventure";
event["language"] = "English";
event["duration"] = 178;
event["time_played"] = 62.4;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_media_stopped";
event["media_id"] = "tt0120737";
event["media_name"] = "The Lord of the Rings: The Fellowship of the Ring";
event["actor_id"] = "nm0000704";
event["actor_name"] = "Elijah Wood";
event["director_id"] = "nm0001392";
event["director_name"] = "Peter Jackson";
event["genre_id"] = "237";
event["genre"] = "adventure";
event["language"] = "English";
event["duration"] = 178;
event["time_played"] = 62.4;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_media_stopped",
media_id : "tt0120737",
media_name : "The Lord of the Rings: The Fellowship of the Ring",
actor_id : "nm0000704",
actor_name : "Elijah Wood",
director_id : "nm0001392",
director_name : "Peter Jackson",
genre_id : "237",
genre : "adventure",
language : "English",
duration : 178,
time_played : 62.4
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_media_stopped",
media_id : "tt0120737",
media_name : "The Lord of the Rings: The Fellowship of the Ring",
actor_id : "nm0000704",
actor_name : "Elijah Wood",
director_id : "nm0001392",
director_name : "Peter Jackson",
genre_id : "237",
genre : "adventure",
language : "English",
duration : 178,
time_played : 62.4
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_media_stopped",
media_id : "tt0120737",
media_name : "The Lord of the Rings: The Fellowship of the Ring",
actor_id : "nm0000704",
actor_name : "Elijah Wood",
director_id : "nm0001392",
director_name : "Peter Jackson",
genre_id : "237",
genre : "adventure",
language : "English",
duration : 178,
time_played : 62.4
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_media_stopped");
eventDic.Add("media_id", "tt0120737");
eventDic.Add("media_name", "The Lord of the Rings: The Fellowship of the Ring");
eventDic.Add("actor_id", "nm0000704");
eventDic.Add("actor_name", "Elijah Wood");
eventDic.Add("director_id", "nm0001392");
eventDic.Add("director_name", "Peter Jackson");
eventDic.Add("genre_id", "237");
eventDic.Add("genre", "adventure");
eventDic.Add("language", "English");
eventDic.Add("duration", 178);
eventDic.Add("time_played", 62.4);
DOT.logEvent(eventDic);
미디어 재생 완료 - TV시리즈
유저가 에피소드를 끝까지 시청한 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_media_finished");
eventMap.put("serise_id", "SR3829");
eventMap.put("serise_name", "Game of Thrones: Season 2");
eventMap.put("media_id", "EP19823");
eventMap.put("media_name", "04 Garden of Bones");
eventMap.put("director_id", "D392892");
eventMap.put("director_name", "David Petrarca");
eventMap.put("genre_id", "182");
eventMap.put("genre", "action");
eventMap.put("language", "English");
eventMap.put("duration", 51);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_media_finished"
eventMap["serise_id"] = "SR3829"
eventMap["serise_name"] = "Game of Thrones: Season 2"
eventMap["media_id"] = "EP19823"
eventMap["media_name"] = "04 Garden of Bones"
eventMap["director_id"] = "D392892"
eventMap["director_name"] = "David Petrarca"
eventMap["genre_id"] = "182"
eventMap["genre"] = "action"
eventMap["language"] = "English"
eventMap["duration"] = 51
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_media_finished"
event["serise_id"] = "SR3829"
event["serise_name"] = "Game of Thrones: Season 2"
event["media_id"] = "EP19823"
event["media_name"] = "04 Garden of Bones"
event["director_id"] = "D392892"
event["director_name"] = "David Petrarca"
event["genre_id"] = "182"
event["genre"] = "action"
event["language"] = "English"
event["duration"] = 51
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_media_finished" forKey:@"event"];
[event setValue:@"SR3829" forKey:@"serise_id"];
[event setValue:@"Game of Thrones: Season 2" forKey:@"serise_name"];
[event setValue:@"EP19823" forKey:@"media_id"];
[event setValue:@"04 Garden of Bones" forKey:@"media_name"];
[event setValue:@"D392892" forKey:@"director_id"];
[event setValue:@"David Petrarca" forKey:@"director_name"];
[event setValue:@"182" forKey:@"genre_id"];
[event setValue:@"action" forKey:@"genre"];
[event setValue:@"English" forKey:@"language"];
[event setValue:[NSNumber numberWithInt:51] forKey:@"duration"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_media_finished";
event["serise_id"] = "SR3829";
event["serise_name"] = "Game of Thrones: Season 2";
event["media_id"] = "EP19823";
event["media_name"] = "04 Garden of Bones";
event["director_id"] = "D392892";
event["director_name"] = "David Petrarca";
event["genre_id"] = "182";
event["genre"] = "action";
event["language"] = "English";
event["duration"] = 51;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_media_finished";
event["serise_id"] = "SR3829";
event["serise_name"] = "Game of Thrones: Season 2";
event["media_id"] = "EP19823";
event["media_name"] = "04 Garden of Bones";
event["director_id"] = "D392892";
event["director_name"] = "David Petrarca";
event["genre_id"] = "182";
event["genre"] = "action";
event["language"] = "English";
event["duration"] = 51;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_media_finished";
event["serise_id"] = "SR3829";
event["serise_name"] = "Game of Thrones: Season 2";
event["media_id"] = "EP19823";
event["media_name"] = "04 Garden of Bones";
event["director_id"] = "D392892";
event["director_name"] = "David Petrarca";
event["genre_id"] = "182";
event["genre"] = "action";
event["language"] = "English";
event["duration"] = 51;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_media_finished",
serise_id : "SR3829",
serise_name : "Game of Thrones: Season 2",
media_id : "EP19823",
media_name : "04 Garden of Bones",
director_id : "D392892",
director_name : "David Petrarca",
genre_id : "182",
genre : "action",
language : "English",
duration : 51
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_media_finished",
serise_id : "SR3829",
serise_name : "Game of Thrones: Season 2",
media_id : "EP19823",
media_name : "04 Garden of Bones",
director_id : "D392892",
director_name : "David Petrarca",
genre_id : "182",
genre : "action",
language : "English",
duration : 51
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_media_finished",
serise_id : "SR3829",
serise_name : "Game of Thrones: Season 2",
media_id : "EP19823",
media_name : "04 Garden of Bones",
director_id : "D392892",
director_name : "David Petrarca",
genre_id : "182",
genre : "action",
language : "English",
duration : 51
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_media_finished");
eventDic.Add("serise_id", "SR3829");
eventDic.Add("serise_name", "Game of Thrones: Season 2");
eventDic.Add("media_id", "EP19823");
eventDic.Add("media_name", "04 Garden of Bones");
eventDic.Add("director_id", "D392892");
eventDic.Add("director_name", "David Petrarca");
eventDic.Add("genre_id", "182");
eventDic.Add("genre", "action");
eventDic.Add("language", "English");
eventDic.Add("duration", 51);
DOT.logEvent(eventDic);
미디어 다운로드 - 음악
미디어 다운로드가 시작되는 시점에 아래 코드를 추가합니다.
선택 속성
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_media_downloaded");
eventMap.put("artist_id", "80049126");
eventMap.put("artist_name", "아이유 (IU)");
eventMap.put("media_id", "30598121");
eventMap.put("media_name", "밤편지");
eventMap.put("album_id", "20089092");
eventMap.put("album_name", "밤편지");
eventMap.put("genre_id", "3772");
eventMap.put("genre", "팝, 발라드");
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_media_downloaded"
eventMap["artist_id"] = "80049126"
eventMap["artist_name"] = "아이유 (IU)"
eventMap["media_id"] = "30598121"
eventMap["media_name"] = "밤편지"
eventMap["album_id"] = "20089092"
eventMap["album_name"] = "밤편지"
eventMap["genre_id"] = "3772"
eventMap["genre"] = "팝, 발라드"
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_media_downloaded"
event["artist_id"] = "80049126"
event["artist_name"] = "아이유 (IU)"
event["media_id"] = "30598121"
event["media_name"] = "밤편지"
event["album_id"] = "20089092"
event["album_name"] = "밤편지"
event["genre_id"] = "3772"
event["genre"] = "팝, 발라드"
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_media_downloaded" forKey:@"event"];
[event setValue:@"80049126" forKey:@"artist_id"];
[event setValue:@"아이유 (IU)" forKey:@"artist_name"];
[event setValue:@"30598121" forKey:@"media_id"];
[event setValue:@"밤편지" forKey:@"media_name"];
[event setValue:@"20089092" forKey:@"album_id"];
[event setValue:@"밤편지" forKey:@"album_name"];
[event setValue:@"3772" forKey:@"genre_id"];
[event setValue:@"팝, 발라드" forKey:@"genre"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_media_downloaded";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_media_downloaded";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_media_downloaded";
event["artist_id"] = "80049126";
event["artist_name"] = "아이유 (IU)";
event["media_id"] = "30598121";
event["media_name"] = "밤편지";
event["album_id"] = "20089092";
event["album_name"] = "밤편지";
event["genre_id"] = "3772";
event["genre"] = "팝, 발라드";
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_media_downloaded",
artist_id : "80049126",
artist_name : "아이유 (IU)",
media_id : "30598121",
media_name : "밤편지",
album_id : "20089092",
album_name : "밤편지",
genre_id : "3772",
genre : "팝, 발라드"
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_media_downloaded",
artist_id : "80049126",
artist_name : "아이유 (IU)",
media_id : "30598121",
media_name : "밤편지",
album_id : "20089092",
album_name : "밤편지",
genre_id : "3772",
genre : "팝, 발라드"