RangersAppLogFlutterPlugin
For global version, please check global
branch.
RangersAppLog的Flutter插件。支持埋点上报。
Flutter plugin for RangersAppLog.
提示:可以到Rangers官网查看更详细的文档
Note: Refer to more detailed docs at https://datarangers.com/
集成 Install plugin
Add dependency in pubspec.yaml
dependencies:
rangers_applog_flutter_plugin: ^1.1.0
Install plugin
flutter packages get
iOS
Podfile
Add source commands in Podfile
source 'https://cdn.cocoapods.org'
source 'https://github.com/bytedance/cocoapods_sdk_source_repo.git'
source 'https://github.com/volcengine/volcengine-specs.git'
Add RangersAppLog dependency. 具体可参考Example或iOS集成文档
pod 'RangersAppLog', '~> 6.3.2', :subspecs => ['Core', 'Log', 'Host/CN'] # 中国区上报
# pod 'RangersAppLog', '~> 5.6.3', :subspecs => ['Core', 'Log', 'Host/SG'] # report to SG
初始化 Init SDK
You can init SDK in native side or dart side.
- Natvie side
在原生
- [AppDeleate (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions]
中初始化。 初始化方式请参考Example或iOS集成文档
Take a look at project example project AppDelegate.m.
- dart side.
RangersApplogFlutterPlugin.initRangersAppLog('123456','test_channel', true, true, false, null);
注册插件 Register plugin
#import "GeneratedPluginRegistrant.h"
#import <rangers_applog_flutter_plugin/RangersApplogFlutterPlugin.h>
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[RangersApplogFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"RangersApplogFlutterPlugin"]];
}
@end
Android
初始化 Init SDK
You can init SDK in native side or dart side.
- Init SDK in native side. 在android原生工程集成依赖并初始化RangersAppLog,请参考RangersAppLog Android
- Init SDK in dart side.
Flutter
import plugin
import 'package: rangers_applog_flutter_plugin/rangers_applog_flutter_plugin.dart';
Usage example
RangersApplogFlutterPlugin.onEventV3("test_event_name", {"event_param":"param_value"});
其他更多接口请参考Demo和plugin注释。 For more detailed docs and usage examples, please refer to source code doc and example project in this repo.
Libraries
- autotrack
- autotrack/click/click_info
- autotrack/click/element_key
- autotrack/click/pointer_event_listener
- autotrack/click/xpath
- autotrack/config/config
- autotrack/config/manager
- autotrack/index
- autotrack/log/logger
- autotrack/pageview/page_info
- autotrack/pageview/page_stack
- autotrack/track/track
- autotrack/utils/element_util
- data_observer_manager
- rangers_applog_flutter_plugin