我有一个 Google analytics
帐户,并且已经设置了 android,我需要将它与 iPhone 集成。我已经完成了编码部分。我使用的是我在 android 中使用的相同 tracking ID
。目前只有安卓设备和安卓操作系统显示在谷歌账户中。我应该如何在 Google 分析帐户中添加 iOS 和 iDevices?代码运行良好,我已经看到“事件”中的变化
我是否需要做任何其他事情...
添加了 SDK、库
代码如下
//Google Analytics:
- (void)startGoogleAnalyticsTracking {
@try {
[GAI sharedInstance].debug = NO;
[GAI sharedInstance].dispatchInterval = 120;
[GAI sharedInstance].trackUncaughtExceptions = YES;
self.googleAnalyticsTracker = [[GAI sharedInstance] trackerWithTrackingId:@"******"];
}@catch (NSException *exception) {
NSLog(@"exception:%@",exception);
}
}
- (void)sendGoogleAnalyticsStartup {
@try {
[self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Starts" withValue:nil];
}@catch (NSException *exception) {
NSLog(@"exception=%@",exception);
}
}
- (void)stopGoogleAnalyticsTracking {
@try {
[self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Suspended /Stopped" withValue:nil];
}@catch (NSException *exception) {
NSLog(@"exception=%@",exception);
}
}
最佳答案
最近我也在使用 Google Analytics。 我注意到大约需要 24 小时才能看到结果。 但是,您也可以在实时菜单中测试应用是否发送数据。
关于ios - Google Analytics 不显示 iPhone 设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20282956/