Reputation: 11
I've seen a few posts around that previous versions <3.03 doesn't seem to work and I've tried all kinds of things now but this still doesn't appear to be working - nothing appears in the Behaviour/App Speed section of my GA
I'm using the iOS 3.03 GA SDK. Here is my code:
- (void)onLoad:(NSTimeInterval *)loadTime {
NSNumber *n = [NSNumber numberWithDouble:*loadTime*1000];
NSLog(@"Time sent = %f ms", [n floatValue]);
id tracker = [[GAI sharedInstance] defaultTracker];
[tracker send:[[GAIDictionaryBuilder createTimingWithCategory:@"resources" interval:n name:@"candidatesLoadTime" label:@"loadTime"] build]];
}
Thanks in advance for any help/advice
Upvotes: 1
Views: 1149
Reputation: 6077
I have had the same issue as you for a while, but finally found the solution that worked for me!
It's not documented, as far as I can tell, but the createTimingWithCategory:interval:name:label:
method takes the interval parameter as a NSNumber
that is required to be contain an integer
value
Try replacing the first row of your method with this:
NSNumber *n = [NSNumber numberWithInt:(int)(loadTime*1000)];
Credits go to nh32rg from this answer
Upvotes: 6