ViewTracker is a tool to automatically collect exposure and click event data.
Now just support Objective-C, not swift support.
The system requirement for ViewTracker is iOS 7.0+
- Two platform support (iOS & Android, See ViewTracker-Android in Github for Android Version)
- Automated Data Collection for exposure and click event.
- Covering a variety of scenes , such as Tab、ScrollView、UIControlEventTouchUpInside、Page or App switch.
- A good performance on Page FPS.
- Compact API.
- Move to Performance Test
Use Cocoapods to Get latest version of ViewTracker
pod 'ViewTracker'feature/viewtrack-opensource
#import "ViewTrackerProxy.h" #import <TMViewTrackerSDK/TMViewTrackerSDK.h> ... [[TMViewTrackerManager sharedManager] setCommitProtocol:[ViewTrackerProxy new]]; ...ViewTrackerProxy.h
#import <TMViewTrackerSDK/TMViewTrackerSDK.h> @interface ViewTrackerProxy : NSObject <TMViewTrackerCommitProtocol> @endViewTrackerProxy.m
#import "ViewTrackerProxy.h" @implementation ViewTrackerProxy - (instancetype)init { if (self = [super init]) { //init ViewTrack Config NSDictionary * dictionary = @{kExposureSwitch:@(1), kClickSwitch:@(1)}; [[TMViewTrackerManager sharedManager] setViewTrackerConfig:dictionary]; //register notification to handle changes of config from server. } return self; } - (void)ctrlClicked:(NSString*)controlName onPage:(NSString*)pageName args:(NSDictionary*)args { NSLog(@"Clicked on Page(%@), controlName(%@), with args(%@)", pageName, controlName, args); } - (void)module:(NSString*)moduleName showedOnPage:(NSString*)pageName duration:(NSUInteger)duration args:(NSDictionary *)args { NSLog(@"module on Page(%@), controlName(%@), duration(%lu), with args(%@)", pageName, moduleName, (unsigned long)duration, args); } @end#import <TMViewTrackerSDK/TMViewTrackerSDK.h> ... view.controlName=@"banner-0"; view.args=@{@"picName":@"pic1"}; ...#import <TMViewTrackerSDK/TMViewTrackerSDK.h> ... - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [TMViewTrackerManager setCurrentPageName:@"Tab-1"]; } ...- @圆寸
- @子央
ViewTracker is available under the Apache2.0 license. See the LICENSE file for more info.