GithubHelp home page GithubHelp logo

sdtracktool's Introduction

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.

sdtracktool's People

Contributors

lisidi avatar

Watchers

James Cloos avatar zxfmpy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.