我添加了所有框架,并实现了其他GA API代码并返回了分析数据。不确定错误是什么?我收到“选择器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];