Skip to content

OpenFlutter/umeng_analytics_flutter

 
 

Repository files navigation

umeng_analytics_flutter

友盟统计Flutter插件

友盟统计官方SDK: umeng:analytics

使用

初始化

import 'package:platform/platform.dart';

final Platform platform = const LocalPlatform();
if (platform.isAndroid)
  UMengAnalytics.init('Android AppKey', encrypt: true, reportCrash: false);
else if (platform.isIOS)
  UMengAnalytics.init('iOS AppKey', encrypt: true, reportCrash: false);

需要收集日志的页面

initState() {
  super.initState();

  UMengAnalytics.beginPageView("home");
}

dispose() {
  super.dispose();

  UMengAnalytics.endPageView("home");
}

someFunction() {
  UMengAnalytics.logEvent("some click");
}

其它

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

Releases

No releases published

Packages

No packages published

Languages

  • Java 41.2%
  • Dart 40.4%
  • Objective-C 12.6%
  • Ruby 5.8%