我正在尝试使用Google Analytics(分析)跟踪我的应用速度,但是在Google Analytics(分析)帐户中我看不到任何应用程序的速度.我已经跟踪了其他参数,如事件,崩溃和异常.对于这些参数,我可以看到我的Google分析帐户中生成的报告.以下是我用来发送事件时间的代码. 
  
  
 
self.endDate=[NSDate date];
 double timeDiff=[_startDate
 timeIntervalSinceDate:_endDate];
 NSLog(@"timeDiff----%f",timeDiff); 
 if([[[GAI sharedInstance]defaultTracker] sendTimingWithCategory:category
                                                       withValue:timeDiff
                                                        withName:@"LoadTime"      
                                                       withLabel:category])   {
       NSLog(@"Succesfully sent load time to GA");   
 } 
 以下是控制台中打印的消息.
GoogleAnalytics 2.0b4 -[GAIdispatcher
dispatchComplete:withStartTime:withRetryNumber:withResponse:withData:withError:]
(GAIdispatcher.m:415) DEBUG: Successfully dispatched hit /GAIHit/p479
(0 retries).
如果你有,请提供任何示例代码.
请帮助我提前致谢.
解决方法
 我发现间隔必须是一个整数.它是期望毫秒,但NSTimeInterval是秒,所以它尝试发送它为“3.1234”,但如果将其转换为毫秒,它会发送它为3123,你应该看到结果.要转换我使用(GA V3) 
  
  
 
        [tracker send:[[GAIDictionaryBuilder createTimingWithCategory:category interval:@((int)(interval * 1000)) name:name label:label] build]]