且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 iphone 谷歌移动分析进行调度时出现问题

更新时间:2023-11-20 19:45:04

事实证明,您所要做的就是删除应用程序并重新安装.一旦您记录了一个错误的页面视图(即开头没有/"的页面),任何内容都不会上传到谷歌分析

I have integrated Google mobile analytics into my iphone app, but for some reason the page views and events are not dispatching.

I put this into my app delegate applicationDidFinishLaunching method (i've x'd out the UA string):

[[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-xxxxxx-x" dispatchPeriod:10 delegate:self]; NSError *error; [[GANTracker sharedTracker] trackPageview:@"/home" withError:&error];

This is the delegate method:

- (void)trackerDispatchDidComplete:(GANTracker *)tracker eventsDispatched:(NSUInteger)eventsDispatched eventsFailedDispatch:(NSUInteger)eventsFailedDispatch { NSLog(@"Google Analytics Dispatch: succeeded:%i, failed:%i",eventsDispatched,eventsFailedDispatch); }

which prints out the message:

Google Analytics Dispatch: succeeded:0, failed:190

Did anyone else run into this problem?

It turns out all you have to do is delete the application and reinstall. Once you log one incorrect page view (ie one without a "/" at the beginning) nothing will upload to google analytics