CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by EricShi.
Depends on: | |
UMengAnalytics | ~> 2.2.1 |
GoogleAnalytics-iOS-SDK | ~> 3.0.2 |
AVOSCloud | >= 0 |
To be a full statistics SDK for all iOS statistics tools. For example, UMeng, 百度统计, Google Analytics
- (void)initStatisticsSDK
{
[AnalyticsSDK connectGoogleWithTrackingID:kAnalyticAppKeyGoogle];
[AnalyticsSDK connectUmengWithAppKey:kAnalyticAppKeyUmeng];
[AnalyticsSDK setLogEnabled:YES];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self initStatisticsSDK];
return YES;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[AnalyticsSDK beginLogView:NSStringFromClass([self class])];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[AnalyticsSDK endLogView:NSStringFromClass([self class])];
}
For extend: automatic log view
#import "StatisticsViewController.h"
@interface SecondViewController : AnalyticsViewController
@end
- (IBAction)btnDidPressed:(id)sender
{
[AnalyticsSDK eventWithCategory:@"First" action:@"Button" label:@"Pressed" value:nil];
[AnalyticsSDK eventWithCategory:@"First" action:@"Button" label:@"Pressed" time:1000];
}
Eric, [email protected]
AnalyticsSDK is available under the MIT license. See the LICENSE file for more info.