本文介绍了在Google Analytics(分析)API跟踪器代码中找不到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了所有框架&实施了其他GA API代码并返回了分析数据.不确定错误是什么?我收到选择器sendEventWithCategory的未知实例:
I have added all frameworks & have other GA API code implemented and returning analytics. Not sure what the error is? I'm getting "no known instance for selector sendEventWithCategory:
(IBAction)didTouchOnInviteButton
{
ContactListViewController *contactsViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ContactListViewControllerId"];
contactsViewController.mode = modeInviteToEvent;
contactsViewController.event = self.event;
[self.navigationController pushViewController:contactsViewController animated:YES];
id <GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
[tracker sendEventWithCategory:@"Contacts" withAction:@"Invite Button Pressed" withValue:1];
}
推荐答案
尝试一下:
[[GAI sharedInstance].defaultTracker sendEventWithCategory:@"Contacts" withAction:@"Invite Button Pressed" withLabel:nil withValue:@1];
这篇关于在Google Analytics(分析)API跟踪器代码中找不到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!