【发布时间】:2013-11-29 09:57:32
【问题描述】:
我有一个Google analytics 帐户,已经设置了 android,我需要将它与 iPhone 集成。我已经完成了编码部分。我正在使用我在 android 中使用的相同 tracking ID。目前google账号只显示android设备和android os。我应该如何在 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);
}
}
【问题讨论】:
-
您在 Android 和 iPhone 上使用的是哪个 SDK 版本的 Google Analytics?您知道您使用的是哪种类型的帐户吗? (网络/移动)
-
我正在使用手机,我已经从 google analeptics 帐户下载了库
标签: ios iphone google-analytics