BLUF:Google Analytics iOS v2 beta 4 错过了跟踪我的第一个UIViewController
在后续成功点击时加载的内容UIViewControllers
(使用 子类化GAITrackedViewController
)
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Optional: automatically send uncaught exceptions to Google Analytics.
[GAI sharedInstance].trackUncaughtExceptions = YES;
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
[GAI sharedInstance].dispatchInterval = 0;
// Optional: set debug to YES for extra debugging information.
[GAI sharedInstance].debug = YES;
// Create tracker instance.
[[GAI sharedInstance] trackerWithTrackingId:@"UA-########-1"]; // id<GAITracker> tracker =
return YES;
}
主视图控制器.m
- (void)viewDidLoad
{
NSLog(@"viewDidLoad");
[super viewDidLoad];
self.trackedViewName = @"First Screen";
//[[GAI sharedInstance] dispatch];
...
}
我不会在 working 上手动调用 dispatch UIViewController
,并且我尝试过调用和不调用 non-working。但这是一个谜。如果我不手动调用它,则不会生成日志。当我手动调用调度时,我收到以下信息:
GoogleAnalytics 2.0b4 -[GAIDispatcher initialDispatch:retryNumber:] (GAIDispatcher.m:481) 调试:没有待处理的命中。
提前致谢!