我尝试使用 Google Analytics 跟踪我的应用程序,但没有看到它何时以“实时模式”打开。
我正在使用Google Analytics for Mobile Apps iOS SDK v3
.
在Delegate.m
:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
// 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 = 20;
// Optional: set Logger to VERBOSE for debug information.
[[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];
// Initialize tracker.
[[GAI sharedInstance] trackerWithTrackingId:@"UA-MYTRACKID-HERE"];
return YES;
}
也许,在IOS模拟器中是不可能的?