Name: TMViewTrackerSDK
Owner: Alibaba
Description: ViewTracker is a sdk can help Developers to collect exposure and click events automatically.
Created: 2017-08-14 02:25:24.0
Updated: 2018-05-18 15:47:06.0
Pushed: 2017-10-23 09:00:14.0
Homepage: https://github.com/alibaba/TMViewTrackerSDK/blob/master/README.md
Size: 321
Language: Objective-C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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+
Use Cocoapods to Get latest version of ViewTracker
'ViewTracker'
feature/viewtrack-opensource
ort "ViewTrackerProxy.h"
ort <TMViewTrackerSDK/TMViewTrackerSDK.h>
[[TMViewTrackerManager sharedManager] setCommitProtocol:[ViewTrackerProxy new]];
ViewTrackerProxy.h
ort <TMViewTrackerSDK/TMViewTrackerSDK.h>
erface ViewTrackerProxy : NSObject <TMViewTrackerCommitProtocol>
ViewTrackerProxy.m
ort "ViewTrackerProxy.h"
lementation ViewTrackerProxy
nstancetype)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;
oid)ctrlClicked:(NSString*)controlName
onPage:(NSString*)pageName
args:(NSDictionary*)args
NSLog(@"Clicked on Page(%@), controlName(%@), with args(%@)", pageName, controlName, args);
oid)module:(NSString*)moduleName
owedOnPage:(NSString*)pageName
duration:(NSUInteger)duration
args:(NSDictionary *)args
NSLog(@"module on Page(%@), controlName(%@), duration(%lu), with args(%@)", pageName, moduleName, (unsigned long)duration, args);
ort <TMViewTrackerSDK/TMViewTrackerSDK.h>
view.controlName=@"banner-0";
view.args=@{@"picName":@"pic1"};
ort <TMViewTrackerSDK/TMViewTrackerSDK.h>
oid)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.