flutter_baidu_mob_stat

Last updated:

0 purchases

flutter_baidu_mob_stat Image
flutter_baidu_mob_stat Images
Add to Cart

Description:

flutter baidu mob stat

fl_baidu_mob_stat_ys #
百度移动统计Flutter插件
运行 Example 查看 事例
查看全部API
开始使用 #

注册key

Future<void> fun() async {
final bool key = await FlBaiduMobStat().setApiKey(
androidKey: 'androidKey', iosKey: 'iosKey');
print('初始化是否成功:$key');
}

copied to clipboard

设置channel (可选)

Future<void> fun() async {
final bool channel = await FlBaiduMobStat().setAppChannel(channelName);
print('设置channel:$channelName = $channel');
}

copied to clipboard

设置version (可选)

Future<void> fun() async {
final bool version = await FlBaiduMobStat().setAppVersionName('1.0.0');
print('设置version name:$version');
}

copied to clipboard

是否开启debug模式 (可选)

Future<void> fun() async {
final bool debug = await FlBaiduMobStat().setDebug(true);
print('设置是否开启debug模式:$debug');
}

copied to clipboard

获取SDK生成的设备的测试ID

Future<void> fun()async{
final String? id = await FlBaiduMobStat().getTestDeviceId();
}
copied to clipboard

获取SDK生成的设备的cuId (android 上获取为空字符串)

Future<void> fun()async{
final String? id = await FlBaiduMobStat().getDeviceCuId();
}
copied to clipboard

记录一次事件的点击。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().logEvent(
eventId: 'Event1',
attributes: <String, String>{'k1': 'v1', 'k2': 'v2'});
}
copied to clipboard

记录一次事件的时长。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().logDurationEvent(
eventId: 'Event2',
duration: 3000,
label: 'event',
attributes: <String, String>{'k1': 'v1'});
}
copied to clipboard

记录一次事件的开始。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().eventStart(eventId: 'Event3');
}
copied to clipboard

记录一次事件的结束。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().eventEnd(
eventId: 'Event3',
attributes: <String, String>{'k1': 'v1'});
}
copied to clipboard

记录某个页面访问的开始。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().pageStart('AnotherPage');
}
copied to clipboard

记录某个页面访问的结束。

Future<void> fun()async{
final bool state = await FlBaiduMobStat().pageEnd('AnotherPage');
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.