Latest 0.9.1
Homepage https://github.com/CoderLISIDI/SDTrackTool
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

SDTrackTool可以减少统计上报代码,实现较简单的无痕埋点。

特性

  • [√] Runtime
  • [√] AOP思想
  • [√] 界面、事件统计可配置化
  • [√] 减少垃圾代码
  • [√] 可拓展性,方便切换任意统计SDK

哪些app在用

  • Hi维修
  • Hi工程师

安装

两种方式安装 SDTrackTool :

  • CocoaPods
  • 手动拖拽文件

通过CocoaPods安装

Podfile

platform :ios, '8.0'
pod 'SDTrackTool'

How To Use

AppDelegate.m

#import "SDTrackTool.h"
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [SDTrackTool configure];
}
SDTrackTool.m

#import "SDTrackTool.h"
...
+ (void)configure {
//第三方统计sdk配置
//    UMConfigInstance.appKey = UMENG_KEY;
//    UMConfigInstance.eSType = E_UM_NORMAL;
////    UMConfigInstance.ePolicy = 0;
//    NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
//    NSString *currentVersion = [infoDict objectForKey:@"CFBundleShortVersionString"];
//    [MobClick setAppVersion:currentVersion];
//    [MobClick startWithConfigure:UMConfigInstance];
//
//#ifdef DEBUG
//    [MobClick setLogEnabled:YES];
//    [MobClick setCrashReportEnabled:NO];
//#endif
}

+(void)beginLogPageID:(NSString *)pageID {
//    [MobClick beginLogPageView:pageID];
}

+(void)endLogPageID:(NSString *)pageID {
//    [MobClick endLogPageView:pageID];
}

+(void)logEvent:(NSString*)eventId {
//    [MobClick event:eventId];
}
在要统计的界面 #import "SDTrackTool.h"
按照示例,填写配置SDTrackEvents.plist

Author

Licenses

All source code is licensed under the MIT License.

Latest podspec

{
    "name": "SDTrackTool",
    "version": "0.9.1",
    "summary": "Track events",
    "description": "Track events without dirty code",
    "homepage": "https://github.com/CoderLISIDI/SDTrackTool",
    "license": "MIT",
    "authors": {
        "u674eu601du8fea": "[email protected]"
    },
    "source": {
        "git": "https://github.com/CoderLISIDI/SDTrackTool.git",
        "tag": "0.9.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "SDTrackTool/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This