iOS版Google Analytics(分析)不派遣活动 [英] Google Analytics for iOS not dispatching events
问题描述
我使用最新的SDK版本,以及注册和发送页面视图的基本代码:
[[ GANTracker sharedTracker] startTrackerWithAccountID:@UA-MY_ACCOUNT_ID-1
dispatchPeriod:10
delegate:self];
NSError *错误;
if(![[GANTracker sharedTracker] trackPageview:@/ firstpage
withError:& error]){
NSLog(@tracker failed:%@,错误);
}
然而,事件不是从设备或模拟器分派的。也没有错误。当我打开调试标志,我可以看到以下内容:
调度调用
调度4个事件
[10秒后]
调度称为
...调度员忙于
[10秒后]
调度称为
...调度员繁忙
我的委托方法永远不会被调用:
NSLog(@success:%):
- (void)trackerDispatchDidComplete:(GANTracker *)tracker
eventsDispatched: d故障:%d,eventsDispatched,eventsFailedDispatch);
}
- 我尝试创建新的发布商ID,但它也没有帮助。
- 我在设备和模拟器上连接了互联网。
-
- 我使用了发送期 - 将其设置为-1并手动调用分发
没有任何帮助......:( p>
我现在正在为此苦苦挣扎一天...我怎么才能使它工作?
我和调度程序有同样的问题(... dispatcher busy)。就我而言,这是因为我通常在后台运行我的应用程序,并且它使用调度程序。当我尝试将设备连接到Xcode以运行和调试应用程序时,控制台向我显示了该消息。因此,解决方案很简单: I'm using the latest SDK version, and the basic code to register and send a page view: However the events are not dispatched from the device or simulator. There are no errors as well. When i turn on the debug flag, i can see the following: My delegate method never gets called:
Nothing helped.... :( I'm struggling with this for a day now... how can i make it work? I had the same problem with the dispatcher ("...dispatcher was busy"). In my case, it was because I had run my app normally in the background, and it was using the dispatcher. When I tried to connect the device to Xcode to run and debug the app, the console showed me that message. So the solution was easy: That's it. 这篇关于iOS版Google Analytics(分析)不派遣活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
[[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-MY_ACCOUNT_ID-1"
dispatchPeriod:10
delegate:self];
NSError *error;
if (![[GANTracker sharedTracker] trackPageview:@"/firstpage"
withError:&error]) {
NSLog(@"tracker failed: %@",error);
}
dispatch called
dispatching 4 events
[after 10 seconds]
dispatch called
...dispatcher was busy
[after 10 seconds]
dispatch called
...dispatcher was busy
- (void)trackerDispatchDidComplete:(GANTracker *)tracker
eventsDispatched:(NSUInteger)eventsDispatched
eventsFailedDispatch:(NSUInteger)eventsFailedDispatch{
NSLog(@"success: %d failures: %d",eventsDispatched,eventsFailedDispatch);
}