Mobility : 모빌리티
모빌리티 앱에서 측정을 권장하는 인앱 이벤트 API와 적용 예시를 안내합니다.
Last updated
모빌리티 앱에서 측정을 권장하는 인앱 이벤트 API와 적용 예시를 안내합니다.
Last updated
속성 중 Key 이름은 가이드에 나와있는 Key 이름을 그대로 사용 해 주세요. (임의로 변경시 대시보드에서 데이터 확인이 어렵습니다. > car_name, car_type 등)
차량이 등록된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
car_name
레이
string
차량 명칭
car_type
소형
string
차량 유형
car_subtype_a
하이패스
string
차량 기타 속성
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);
특정 위치가 북마크로 등록된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
bookmark_type
집
string
북마크 명칭 또는 유형
city
서울시
string
등록된 위치의 도시 정보
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);
결제 수단이 등록 완료된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
payment_name
현대카드
string
결제수단 명칭
payment_type
신용카드
string
결제수단 유형
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);
목적지 검색이 완료된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
출발 지역
destination_b
올림픽공원
string
도착 지역
g20
2
float
검색 결과로 출력된 아이템 개수
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);
차량 호출이 완료된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
차량이 출발하는 지역명
destination_b
올림픽공원
string
차량이 도착할 지역명
distance
5.8
float
목적지까지의 거리
city
서울
string
차량을 호출하는 위치가 속한 도시
price
31500
double
운행요금
currency
KRW
string
통화코드
product_id
C30403
string
요청한 상품코드
product_name
베이직
string
요청한 상품명칭
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);
호출이 승인되어 배차가 완료된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
차량이 출발하는 지역명
destination_b
올림픽공원
string
차량이 도착할 지역명
distance
5.8
float
목적지까지의 거리
city
서울
string
차량을 호출한 위치가 속한 도시
car_id
V39849
string
배차된 차량 ID
car_type
sedan
string
배차된 차량 유형
driver_id
DR3020
string
배차된 운전자 ID
price
31500
string
운행요금
currency
KRW
string
통화코드
product_id
C30403
string
배차된 상품코드
product_name
베이직
string
배차된 상품명칭
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 : "올림픽공원",
distance : 5.8,
city : "서울",
car_id : "V39849",
car_type : "sedan",
driver_id : "DR3020",
price : 31500,
currency : "KRW",
product : {
product_id : "C30403",
product_name : "베이직"
}
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_ride_approved");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("distance", 5.8);
eventDic.Add("city", "서울");
eventDic.Add("car_id", "V39849");
eventDic.Add("car_type", "sedan");
eventDic.Add("driver_id", "DR3020");
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);
호출이 취소된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
차량이 출발하는 지역명
destination_b
올림픽공원
string
차량이 도착할 지역명
distance
5.8
float
목적지까지의 거리
city
서울
string
차량을 호출한 위치가 속한 도시
car_id
V39849
string
배차된 차량 ID
car_type
sedan
string
배차된 차량 유형
driver_id
DR3020
string
배차된 운전자 ID
price
31500
string
운행요금
currency
KRW
string
통화코드
product_id
C30403
string
배차된 상품코드
product_name
베이직
string
배차된 상품명칭
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_ride_cancelled");
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_cancelled"
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_cancelled"
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_cancelled" 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_cancelled";
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_cancelled";
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_cancelled";
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_cancelled";
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_cancelled",
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_cancelled",
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 : "베이직"
}
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_ride_cancelled");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("distance", 5.8);
eventDic.Add("city", "서울");
eventDic.Add("car_id", "V39849");
eventDic.Add("car_type", "sedan");
eventDic.Add("driver_id", "DR3020");
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);
차량이 목적지까지 운행을 마치고 비용이 결제된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
transaction_id
CL39932003
string
주문번호
destination_a
선릉역
string
차량이 출발한 지역명
destination_b
올림픽공원
string
차량이 도착한 지역명
distance
5.8
float
목적지까지의 거리
city
서울
string
차량을 호출한 위치가 속한 도시
car_id
V39849
string
배차된 차량 ID
car_type
sedan
string
배차된 차량 유형
driver_id
DR3020
string
배차된 운전자 ID
price
31500
string
운행요금
currency
KRW
string
통화코드
riding_time
21
float
운행 시작부터 운행 완료까지의 시간을 분단위로 입력
product_id
C30403
string
배차된 상품코드
product_name
베이직
string
배차된 상품명칭
quantity
1
string
호출한 차량 대수
revenue
31500
double
유저가 결제한 금액
Map<String, Object> purchaseMap = new HashMap<>();
purchaseMap.put("transaction_id", "CL39932003");
purchaseMap.put("destination_a", "선릉역");
purchaseMap.put("destination_b", "올림픽공원");
purchaseMap.put("distance", 5.8);
purchaseMap.put("city", "서울");
purchaseMap.put("car_id", "V39849");
purchaseMap.put("car_type", "sedan");
purchaseMap.put("driver_id", "DR3020");
purchaseMap.put("price", 31500);
purchaseMap.put("currency", "KRW");
purchaseMap.put("riding_time", 21);
Map<String, Object> productMap = new HashMap<>();
productMap.put("product_id", "C30403");
productMap.put("product_name", "베이직");
productMap.put("quantity", 1);
productMap.put("revenue", 31500);
purchaseMap.put("product", productMap);
DOT.logPurchase(purchaseMap);
val purchaseMap = mutableMapOf<String,Any>()
purchaseMap["transaction_id"] = "CL39932003"
purchaseMap["destination_a"] = "선릉역"
purchaseMap["destination_b"] = "올림픽공원"
purchaseMap["distance"] = 5.8
purchaseMap["city"] = "서울"
purchaseMap["car_id"] = "V39849"
purchaseMap["car_type"] = "sedan"
purchaseMap["driver_id"] = "DR3020"
purchaseMap["price"] = 31500
purchaseMap["currency"] = "KRW"
purchaseMap["riding_time"] = 21
val productMap = mutableMapOf<String,Any>()
productMap["product_id"] = "C30403"
productMap["product_name"] = "베이직"
productMap["quantity"] = 1
productMap["revenue"] = 31500
purchaseMap["product"] = productMap
DOT.logPurchase(purchaseMap)
let purchase = NSMutableDictionary()
purchase["transaction_id"] = "CL39932003"
purchase["destination_a"] = "선릉역"
purchase["destination_b"] = "올림픽공원"
purchase["distance"] = 5.8
purchase["city"] = "서울"
purchase["car_id"] = "V39849"
purchase["car_type"] = "sedan"
purchase["driver_id"] = "DR3020"
purchase["price"] = 31500
purchase["currency"] = "KRW"
purchase["riding_time"] = 21
var product : [String: Any] = [:]
product["product_id"] = "C30403"
product["product_name"] = "베이직"
product["quantity"] = 1
product["revenue"] = 31500
purchase["product"] = product
DOT.logPurchase(purchase)
NSMutableDictionary *purchase = [[NSMutableDictionary alloc] init];
[purchase setValue:@"CL39932003" forKey:@"transaction_id"];
[purchase setValue:@"선릉역" forKey:@"destination_a"];
[purchase setValue:@"올림픽공원" forKey:@"destination_b"];
[purchase setValue:[NSNumber numberWithInt:5.8] forKey:@"distance"];
[purchase setValue:@"서울" forKey:@"city"];
[purchase setValue:@"V39849" forKey:@"car_id"];
[purchase setValue:@"sedan" forKey:@"car_type"];
[purchase setValue:@"DR3020" forKey:@"driver_id"];
[purchase setValue:[NSNumber numberWithInt:31500] forKey:@"price"];
[purchase setValue:@"KRW" forKey:@"currency"];
[purchase setValue:[NSNumber numberWithInt:21] forKey:@"riding_time"];
NSMutableDictionary *product = [[NSMutableDictionary alloc] init];
[product setValue:@"C30403" forKey:@"product_id"];
[product setValue:@"베이직" forKey:@"product_name"];
[product setValue:[NSNumber numberWithInt:1] forKey:@"quantity"];
[product setValue:[NSNumber numberWithInt:31500] forKey:@"revenue"];
[purchase setValue:@product forKey:@"product"]
[DOT logPurchase:purchase];
var purchase = new Object();
purchase["transaction_id"] = "CL39932003";
purchase["destination_a"] = "선릉역";
purchase["destination_b"] = "올림픽공원";
purchase["distance"] = 5.8;
purchase["city"] = "서울";
purchase["car_id"] = "V39849";
purchase["car_type"] = "sedan";
purchase["driver_id"] = "DR3020";
purchase["price"] = 31500;
purchase["currency"] = "KRW";
purchase["riding_time"] = 21;
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
product["quantity"] = 1;
product["revenue"] = 31500;
purchase["product"] = product;
DOT.logPurchase(purchase);
var purchase = new Object();
purchase["transaction_id"] = "CL39932003";
purchase["destination_a"] = "선릉역";
purchase["destination_b"] = "올림픽공원";
purchase["distance"] = 5.8;
purchase["city"] = "서울";
purchase["car_id"] = "V39849";
purchase["car_type"] = "sedan";
purchase["driver_id"] = "DR3020";
purchase["price"] = 31500;
purchase["currency"] = "KRW";
purchase["riding_time"] = 21;
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
product["quantity"] = 1;
product["revenue"] = 31500;
purchase["product"] = product;
WDOT.logPurchase(purchase);
// .dart 에서 호출 할 때
Map purchase = {};
purchase["transaction_id"] = "CL39932003";
purchase["destination_a"] = "선릉역";
purchase["destination_b"] = "올림픽공원";
purchase["distance"] = 5.8;
purchase["city"] = "서울";
purchase["car_id"] = "V39849";
purchase["car_type"] = "sedan";
purchase["driver_id"] = "DR3020";
purchase["price"] = 31500;
purchase["currency"] = "KRW";
purchase["riding_time"] = 21;
Map product = {};
product["product_id"] = "C30403";
product["product_name"] = "베이직";
product["quantity"] = 1;
product["revenue"] = 31500;
purchase["product"] = product;
DOT.logPurchase(purchase);
// webview 에서 호출 할 때
var purchase = new Object();
purchase["transaction_id"] = "CL39932003";
purchase["destination_a"] = "선릉역";
purchase["destination_b"] = "올림픽공원";
purchase["distance"] = 5.8;
purchase["city"] = "서울";
purchase["car_id"] = "V39849";
purchase["car_type"] = "sedan";
purchase["driver_id"] = "DR3020";
purchase["price"] = 31500;
purchase["currency"] = "KRW";
purchase["riding_time"] = 21;
var product = new Object();
product["product_id"] = "C30403";
product["product_name"] = "베이직";
product["quantity"] = 1;
product["revenue"] = 31500;
purchase["product"] = product;
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logPurchase",
data: purchase
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logPurchase(JSON.stringify({
transaction_id : "CL39932003",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
city : "서울",
car_id : "V39849",
car_type : "sedan",
driver_id : "DR3020",
price : 31500,
currency : "KRW",
riding_time : 21,
product : {
product_id : "C30403",
product_name : "베이직",
quantity : 1,
revenue : 31500,
}
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logPurchase",
data : {
transaction_id : "CL39932003",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
city : "서울",
car_id : "V39849",
car_type : "sedan",
driver_id : "DR3020",
price : 31500,
currency : "KRW",
riding_time : 21,
product : {
product_id : "C30403",
product_name : "베이직",
quantity : 1,
revenue : 31500,
}
}
}));
Dictionary<string, object> purchase = new Dictionary<string, object>();
purchase.Add("transaction_id", "CL39932003");
purchase.Add("destination_a", "선릉역");
purchase.Add("destination_b", "올림픽공원");
purchase.Add("distance", 5.8);
purchase.Add("city", "서울");
purchase.Add("car_id", "V39849");
purchase.Add("car_type", "sedan");
purchase.Add("driver_id", "DR3020");
purchase.Add("price", 31500);
purchase.Add("currency", "KRW");
purchase.Add("riding_time", 21);
Dictionary<string, object> product = new Dictionary<string, object>();
product.Add("product_id", "C30403");
product.Add("product_name", "베이직");
product.Add("quantity", 1);
product.Add("revenue", 31500);
List<Dictionary<string, object>> productList = new List<Dictionary<string, object>>();
productList.Add(product);
purchase.Add("product", productList);
DOT.logPurchase(purchase);
목적지와 코스가 설정되어 주행안내가 시작된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
차량이 출발하는 지역명
destination_b
올림픽공원
string
차량이 도착할 지역명
distance
5.8
float
목적지까지의 거리를 km 단위로 입력
est_arrival_time
20
float
예상되는 주행시간을 분단위로 입력
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_navigate");
eventMap.put("destination_a", "선릉역");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("distance", 5.8);
eventMap.put("est_arrival_time", 20);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_navigate"
eventMap["destination_a"] = "선릉역"
eventMap["destination_b"] = "올림픽공원"
eventMap["distance"] = 5.8
eventMap["est_arrival_time"] = 20
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_navigate"
event["destination_a"] = "선릉역"
event["destination_b"] = "올림픽공원"
event["distance"] = 5.8
event["est_arrival_time"] = 20
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_navigate" forKey:@"event"];
[event setValue:@"선릉역" forKey:@"destination_a"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:5.8] forKey:@"distance"];
[event setValue:[NSNumber numberWithInt:20] forKey:@"est_arrival_time"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_navigate";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["est_arrival_time"] = 20;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_navigate";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["est_arrival_time"] = 20;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_navigate";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["est_arrival_time"] = 20;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_navigate",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
est_arrival_time : 20
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_navigate",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
est_arrival_time : 20
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_navigate",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
est_arrival_time : 20
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_navigate");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("distance", 5.8);
eventDic.Add("est_arrival_time", 20);
DOT.logEvent(eventDic);
목적지에 도착하여 주행안내가 종료된 시점에 아래 코드를 추가합니다.
Key
Value 예시
Type
설명
destination_a
선릉역
string
차량이 출발하는 지역명
destination_b
올림픽공원
string
차량이 도착할 지역명
distance
5.8
float
실제 주행거리를 km 단위로 입력
riding_time
21
float
실제 주행시간을 분단위로 입력
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_end_navigation");
eventMap.put("destination_a", "선릉역");
eventMap.put("destination_b", "올림픽공원");
eventMap.put("distance", 5.8);
eventMap.put("riding_time", 21);
DOT.logEvent(eventMap);
val eventMap = mutableMapOf<String,Any>()
eventMap["event"] = "w_end_navigation"
eventMap["destination_a"] = "선릉역"
eventMap["destination_b"] = "올림픽공원"
eventMap["distance"] = 5.8
eventMap["est_arrival_time"] = 21
DOT.logEvent(eventMap)
let event = NSMutableDictionary()
event["event"] = "w_end_navigation"
event["destination_a"] = "선릉역"
event["destination_b"] = "올림픽공원"
event["distance"] = 5.8
event["riding_time"] = 21
DOT.logEvent(event)
NSMutableDictionary *event = [[NSMutableDictionary alloc] init];
[event setValue:@"w_end_navigation" forKey:@"event"];
[event setValue:@"선릉역" forKey:@"destination_a"];
[event setValue:@"올림픽공원" forKey:@"destination_b"];
[event setValue:[NSNumber numberWithInt:5.8] forKey:@"distance"];
[event setValue:[NSNumber numberWithInt:21] forKey:@"riding_time"];
[DOT logEvent:event];
var event = new Object();
event["event"] = "w_end_navigation";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["riding_time"] = 21;
DOT.logEvent(event);
var event = new Object();
event["event"] = "w_end_navigation";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["riding_time"] = 21;
WDOT.logEvent(event);
// .dart 에서 호출 할 때
Map event = {};
event["event"] = "w_end_navigation";
event["destination_a"] = "선릉역";
event["destination_b"] = "올림픽공원";
event["distance"] = 5.8;
event["riding_time"] = 21;
DOT.logEvent(event);
// webview 에서 호출 할 때
DotFlutterDataBridge.postMessage(JSON.stringify({
method : "logEvent",
data: {
event : "w_end_navigation",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
riding_time : 21
}
}));
// .js 에서 호출 할 때
NativeModules.DotReactBridge.logEvent(JSON.stringify({
event : "w_end_navigation",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
riding_time : 21
}));
// webview 에서 호출 할 때
window.ReactNativeWebView.postMessage(JSON.stringify({
method:"logEvent",
data : {
event : "w_end_navigation",
destination_a : "선릉역",
destination_b : "올림픽공원",
distance : 5.8,
riding_time : 21
}
}));
Dictionary<string, object> eventDic = new Dictionary<string, object>();
eventDic.Add("event", "w_end_navigation");
eventDic.Add("destination_a", "선릉역");
eventDic.Add("destination_b", "올림픽공원");
eventDic.Add("distance", 5.8);
eventDic.Add("riding_time", 21);
DOT.logEvent(eventDic);