Mobility : 모빌리티
모빌리티 앱에서 측정을 권장하는 인앱 이벤트 API와 적용 예시를 안내합니다.
Last updated
모빌리티 앱에서 측정을 권장하는 인앱 이벤트 API와 적용 예시를 안내합니다.
Last updated
속성 중 Key 이름은 가이드에 나와있는 Key 이름을 그대로 사용 해 주세요. (임의로 변경시 대시보드에서 데이터 확인이 어렵습니다. > car_name, car_type 등)
차량이 등록된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_add_car_info");
eventMap.put("car_name", "레이");
eventMap.put("car_type", "소형");
eventMap.put("car_subtype_a", "하이패스");
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_add_car_info"
eventMap["car_name"] = "레이"
eventMap["car_type"] = "소형"
eventMap["car_subtype_a"] = "하이패스"
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_add_car_info"
event["car_name"] = "레이"
event["car_type"] = "소형"
event["car_subtype_a"] = "하이패스"
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_add_car_info" forKey:@"event"];
[event setValue:@"레이" forKey:@"car_name"];
[event setValue:@"소형" forKey:@"car_type"];
[event setValue:@"하이패스" forKey:@"car_subtype_a"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_add_car_info";
event["car_name"] = "레이";
event["car_type"] = "소형";
event["car_subtype_a"] = "하이패스";
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_add_car_info";
event["car_name"] = "레이";
event["car_type"] = "소형";
event["car_subtype_a"] = "하이패스";
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_add_car_info";
event["car_name"] = "레이";
event["car_type"] = "소형";
event["car_subtype_a"] = "하이패스";
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_add_car_info",
car_name : "레이",
car_type : "소형",
car_subtype_a : "하이패스"
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_add_car_info",
car_name : "레이",
car_type : "소형",
car_subtype_a : "하이패스"
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_add_car_info",
car_name : "레이",
car_type : "소형",
car_subtype_a : "하이패스"
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_add_car_info");
eventDic.Add("car_name", "레이");
eventDic.Add("car_type", "소형");
eventDic.Add("car_subtype_a", "하이패스");
DOT.logEvent(eventDic);
특정 위치가 북마크로 등록된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_bookmarked");
eventMap.put("bookmark_type", "집");
eventMap.put("city", "서울시");
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_bookmarked"
eventMap["bookmark_type"] = "집"
eventMap["city"] = "서울시"
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_bookmarked"
event["bookmark_type"] = "집"
event["city"] = "서울시"
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_bookmarked" forKey:@"event"];
[event setValue:@"집" forKey:@"bookmark_type"];
[event setValue:@"서울시" forKey:@"city"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_bookmarked";
event["bookmark_type"] = "집";
event["city"] = "서울시";
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_bookmarked";
event["bookmark_type"] = "집";
event["city"] = "서울시";
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_bookmarked";
event["bookmark_type"] = "집";
event["city"] = "서울시";
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_bookmarked",
bookmark_type : "집",
city : "서울시"
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_bookmarked",
bookmark_type : "집",
city : "서울시"
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_bookmarked",
bookmark_type : "집",
city : "서울시"
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_bookmarked");
eventDic.Add("bookmark_type", "집");
eventDic.Add("city", "서울시");
DOT.logEvent(eventDic);
결제 수단이 등록 완료된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_add_payment_info");
eventMap.put("payment_name", "현대카드");
eventMap.put("payment_type", "신용카드");
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_add_payment_info"
eventMap["payment_name"] = "현대카드"
eventMap["payment_type"] = "신용카드"
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_add_payment_info"
event["payment_name"] = "현대카드"
event["payment_type"] = "신용카드"
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_add_payment_info" forKey:@"event"];
[event setValue:@"현대카드" forKey:@"payment_name"];
[event setValue:@"신용카드" forKey:@"payment_type"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_add_payment_info";
event["payment_name"] = "현대카드";
event["payment_type"] = "신용카드";
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_add_payment_info";
event["payment_name"] = "현대카드";
event["payment_type"] = "신용카드";
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_add_payment_info";
event["payment_name"] = "현대카드";
event["payment_type"] = "신용카드";
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_add_payment_info",
payment_name : "현대카드",
payment_type : "신용카드"
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_add_payment_info",
payment_name : "현대카드",
payment_type : "신용카드"
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_add_payment_info",
payment_name : "현대카드",
payment_type : "신용카드"
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_add_payment_info");
eventDic.Add("payment_name", "현대카드");
eventDic.Add("payment_type", "신용카드");
DOT.logEvent(eventDic);
목적지 검색이 완료된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_search_destination");
eventMap.put("destination_a", "선릉역");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("g20", 2);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_search_destination"
eventMap["destination_a"] = "선릉역"
eventMap["destination_b"] = "올림픽공원"
eventMap["g20"] = 2
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_search_destination"
event["destination_a"] = "선릉역"
event["destination_b"] = "올림픽공원"
event["g20"] = 2
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_search_destination" forKey:@"event"];
[event setValue:@"선릉역" forKey:@"destination_a"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:2] forKey:@"g20"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_search_destination";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_search_destination";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_search_destination";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_search_destination",
destination_a : "선릉역",
destination_b : "올림픽공원",
g20 : 2
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_search_destination",
destination_a : "선릉역",
destination_b : "올림픽공원",
g20 : 2
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_search_destination",
destination_a : "선릉역",
destination_b : "올림픽공원",
g20 : 2
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_search_destination");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("g20", 2);
DOT.logEvent(eventDic);
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_search_destination");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("g20", 2);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_search_destination"
eventMap["destination_b"] = "올림픽공원"
eventMap["g20"] = 2
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_search_destination"
event["destination_b"] = "올림픽공원"
event["g20"] = 2
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_search_destination" forKey:@"event"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:2] forKey:@"g20"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_search_destination";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_search_destination";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_search_destination";
event["destination_b"] = "올림픽공원";
event["g20"] = 2;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_search_destination",
destination_b : "올림픽공원",
g20 : 2
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_search_destination",
destination_b : "올림픽공원",
g20 : 2
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_search_destination",
destination_b : "올림픽공원",
g20 : 2
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_search_destination");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("g20", 2);
DOT.logEvent(eventDic);
차량 호출이 완료된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_request_ride");
eventMap.put("destination_a", "선릉역");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("distance", 5.8);
eventMap.put("city", "서울");
eventMap.put("price", 31500);
eventMap.put("currency", "KRW");
Map<String, Object> productMap = new HashMap<>();
productMap.put("product_id", "C30403");
productMap.put("product_name", "베이직");
eventMap.put("product", productMap);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_request_ride"
eventMap["destination_a"] = "선릉역"
eventMap["destination_b"] = "올림픽공원"
eventMap["distance"] = 5.8
eventMap["city"] = "서울"
eventMap["price"] = 31500
eventMap["currency"] = "KRW"
val productMap = mutableMapOf<String,Any>()
productMap["product_id"] = "C30403"
productMap["product_name"] = "베이직"
eventMap["product"] = productMap
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_request_ride"
event["destination_a"] = "선릉역"
event["destination_b"] = "올림픽공원"
event["distance"] = 5.8
event["city"] = "서울"
event["price"] = 31500
event["currency"] = "KRW"
var product : [String: Any] = [:]
product["product_id"] = "C30403"
product["product_name"] = "베이직"
event["product"] = product
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_request_ride" forKey:@"event"];
[event setValue:@"선릉역" forKey:@"destination_a"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:5.8] forKey:@"distance"];
[event setValue:@"서울" forKey:@"city"];
[event setValue:[NSNumber numberWithInt:31500] forKey:@"price"];
[event setValue:@"KRW" forKey:@"currency"];
NSMutableDictionary *product = [[NSMutableDictionary alloc] init];
[product setValue:@"C30403" forKey:@"product_id"];
[product setValue:@"베이직" forKey:@"product_name"];
[event setValue:@product forKey:@"product"]
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_request_ride";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_request_ride";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_request_ride";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["price"] = 31500;
event["currency"] = "KRW";
Map product = {};
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
DOT.logEvent(event);
// webview 에서 호출 할 때
var event = new Object();
event["event"] = "w_request_ride";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product ;
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: event
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_request_ride",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
city : "서울",
price : 31500,
currency : "KRW",
product : {
product_id : "C30403",
product_name : "베이직"
}
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_request_ride",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
city : "서울",
price : 31500,
currency : "KRW",
product : {
product_id : "C30403",
product_name : "베이직"
}
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_request_ride");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("distance", 5.8);
eventDic.Add("city", "서울");
eventDic.Add("price", 31500);
eventDic.Add("currency", "KRW");
Dictionary<string, object> product = new Dictionary<string, object>();
product.Add("product_id", "C30403");
product.Add("product_name", "베이직");
List<Dictionary<string, object>> productList = new List<Dictionary<string, object>>();
productList.Add(product);
eventDic.Add("product", productList);
DOT.logEvent(eventDic);
호출이 승인되어 배차가 완료된 시점에 아래 코드를 추가합니다.
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_ride_approved");
eventMap.put("destination_a", "선릉역");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("distance", 5.8);
eventMap.put("city", "서울");
eventMap.put("car_id", "V39849");
eventMap.put("car_type", "sedan");
eventMap.put("driver_id", "DR3020");
eventMap.put("price", 31500);
eventMap.put("currency", "KRW");
Map<String, Object> productMap = new HashMap<>();
productMap.put("product_id", "C30403");
productMap.put("product_name", "베이직");
eventMap.put("product", productMap);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_ride_approved"
eventMap["destination_a"] = "선릉역"
eventMap["destination_b"] = "올림픽공원"
eventMap["distance"] = 5.8
eventMap["city"] = "서울"
eventMap["car_id"] = "V39849"
eventMap["car_type"] = "sedan"
eventMap["driver_id"] = "DR3020"
eventMap["price"] = 31500
eventMap["currency"] = "KRW"
val productMap = mutableMapOf<String,Any>()
productMap["product_id"] = "C30403"
productMap["product_name"] = "베이직"
eventMap["product"] = productMap
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_ride_approved"
event["destination_a"] = "선릉역"
event["destination_b"] = "올림픽공원"
event["distance"] = 5.8
event["city"] = "서울"
event["car_id"] = "V39849"
event["car_type"] = "sedan"
event["driver_id"] = "DR3020"
event["price"] = 31500
event["currency"] = "KRW"
var product : [String: Any] = [:]
product["product_id"] = "C30403"
product["product_name"] = "베이직"
event["product"] = product
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_ride_approved" forKey:@"event"];
[event setValue:@"선릉역" forKey:@"destination_a"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:5.8] forKey:@"distance"];
[event setValue:@"서울" forKey:@"city"];
[event setValue:@"V39849" forKey:@"car_id"];
[event setValue:@"sedan" forKey:@"car_type"];
[event setValue:@"DR3020" forKey:@"driver_id"];
[event setValue:[NSNumber numberWithInt:31500] forKey:@"price"];
[event setValue:@"KRW" forKey:@"currency"];
NSMutableDictionary *product = [[NSMutableDictionary alloc] init];
[product setValue:@"C30403" forKey:@"product_id"];
[product setValue:@"베이직" forKey:@"product_name"];
[event setValue:@product forKey:@"product"]
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_ride_approved";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["car_id"] = "V39849";
event["car_type"] = "sedan";
event["driver_id"] = "DR3020";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_ride_approved";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["car_id"] = "V39849";
event["car_type"] = "sedan";
event["driver_id"] = "DR3020";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_ride_approved";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["car_id"] = "V39849";
event["car_type"] = "sedan";
event["driver_id"] = "DR3020";
event["price"] = 31500;
event["currency"] = "KRW";
Map product = {};
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product;
DOT.logEvent(event);
// webview 에서 호출 할 때
var event = new Object();
event["event"] = "w_ride_approved";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["city"] = "서울";
event["car_id"] = "V39849";
event["car_type"] = "sedan";
event["driver_id"] = "DR3020";
event["price"] = 31500;
event["currency"] = "KRW";
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
event["product"] = product ;
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: event
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_ride_approved",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
city : "서울",
car_id : "V39849",
car_type : "sedan",
driver_id : "DR3020",
price : 31500,
currency : "KRW",
product : {
product_id : "C30403",
product_name : "베이직"
}
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_ride_approved",
destination_a : "선릉역",
destination_b : "올림픽공원",