On click of a button, I send the user to an external URL (safari). I was to track this action, so I include a call to google analytics right before I call openUrl()
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"action" action:@"button_press" label:@"link" value:nil] build]];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
This successfully gets me to the url in safari, but on coming back to the app, it is just frozen. I have tried wrapping it in dispatch_async main queue block, with no luck.
If I remove the google analytics tracker line, it works fine. Is this a bug in google analytics?