4.1 自定义统计
Android
TJNative.event(String eventId);
TJNative.event(String eventId, String label);
TJNative.event(String eventId, HashMap<String, String> attributes);
iOS
[IOSLoader tj_name:@"eventId"];
[IOSLoader tj_name:@"eventId" value:@"label"];
[IOSLoader tj_name:@"eventId" map:@"attributes"];
Unity
Wb.TjManager.Instance.TJCustomEvent(string eventId);
Wb.TjManager.Instance.TJCustomEvent(string eventId, string label);
Wb.TjManager.Instance.TJCustomEvent(string eventId, Dictionary<string, string> attributes);
参数:
Creator
Wb.Tj.tJCustomEvent(eventId: string);
Wb.Tj.tJCustomEventLabel(eventId: string, label: string);
Wb.Tj.tJCustomEventHashMap(eventId: string, attributes: string);
参数:
attributes:事件的多标签属性(以“,”分割的字符串)
4.2 关卡统计
Android
TJNative.startLevel(String level);//开始关卡
TJNative.finishLevel(String level, String score);//过关成功
TJNative.failLevel(String level, String score);//过关失败
iOS
[IOSLoader tj_startLevel:@"level"];
[IOSLoader tj_finishLevel:@"level"];
[IOSLoader tj_failLevel:@"level"];
Unity
Wb.TjManager.Instance.StartLevel(string level);
Wb.TjManager.Instance.FinishLevel(string level, string score);
Wb.TjManager.Instance.FailLevel(string level, string score);
参数:
注意事项:
成对出现, finishLevel 和 failLevel 的level值一定要是startLevel传的level值
Creator
Wb.Tj.startLevel(level: string);
Wb.Tj.finishLevel(level: string, score: string);
Wb.Tj.failLevel(level: string, score: string);
参数:
注意事项:
成对出现, finishLevel 和 failLevel 的level值一定要是startLevel传的level值
4.3 充值统计
4.3.1 统计充值成功
Android
TJNative.pay(double money, double coin, int source);
iOS
[IOSLoader tj_payWithMoney:money coin:coin source:source];
Unity
Wb.TjManager.Instance.TJPay(double money,double coin, int source);
参数:
source:充值渠道标识(使用PayNative.getDefaultPayType获取)
Creator
Wb.Tj.tJPay(money: string, coin: string, source: number);
参数:
source:充值渠道标识(使用PayNative.getDefaultPayType获取)
4.3.2 统计充值并购买道具
Android
TJNative.pay(double money, String item, int number, double price, int source);
iOS
[IOSLoader tj_payWithMoney:money productId:item number:number price:price score:score];
Unity
Wb.TjManager.Instance.TJPayAndBuy(double money,string item,int number,double price, int source)
参数:
source:充值渠道标识(使用PayNative.getDefaultPayType获取)
Creator
Wb.Tj.tJPayAndBuy(money: string, item: string, number: number, price: string, source: number);
参数:
source:充值渠道标识(使用PayNative.getDefaultPayType获取)
4.4 页面统计
Android
TJNative.onPageStart(String sid);
TJNative.onPageEnd(String sid);
iOS
[IOSLoader tj_onPageStart:@"sid" ];
[IOSLoader tj_onPageEnd:@"sid" ];
Unity
Wb.TjManager.Instance.onPageStart(string sid);
Wb.TjManager.Instance.onPageEnd(string sid);
参数:
注意事项:
成对出现, onPageEnd传的sid值一定要是onPageStart传的sid值
Creator
Wb.Tj.onPageStart(sid: string);
Wb.Tj.onPageEnd(sid: string);
参数:
注意事项:
成对出现, onPageEnd传的sid值一定要是onPageStart传的sid值