iOS - 实时:"active user on app" 在 Google 分析中始终显示“0”
iOS - In Real-Time : "active user on app" always show "0" In Google Analytics
我在我的应用程序中完成了以下代码。
id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"My Track Id"];
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"Show User"
action:@"Show user Clicked"
label:nil
value:nil] build]];
我已经在 3 台或更多设备上安装了我的应用程序,但我看不到当前活跃的用户。它总是显示 0。我该如何解决这个问题。
我已经解决了这个问题。我刚刚在我的应用程序的 AppDelegate.m
文件中添加了以下代码。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GAI sharedInstance].trackUncaughtExceptions = YES;
[[GAI sharedInstance].logger setLogLevel:kGAILogLevelVerbose];
[GAI sharedInstance].dispatchInterval = 20;
[[GAI sharedInstance]dispatch];
return YES;
}
我在我的应用程序中完成了以下代码。
id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"My Track Id"];
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"Show User"
action:@"Show user Clicked"
label:nil
value:nil] build]];
我已经在 3 台或更多设备上安装了我的应用程序,但我看不到当前活跃的用户。它总是显示 0。我该如何解决这个问题。
我已经解决了这个问题。我刚刚在我的应用程序的 AppDelegate.m
文件中添加了以下代码。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GAI sharedInstance].trackUncaughtExceptions = YES;
[[GAI sharedInstance].logger setLogLevel:kGAILogLevelVerbose];
[GAI sharedInstance].dispatchInterval = 20;
[[GAI sharedInstance]dispatch];
return YES;
}