在使用Firebase的Google Analytics教程添加Google Analytics后,我可以在将示例代码添加到我的应用后查看示例代码。为了测试它,我将分析事件添加到IBAction方法,以便在点击特定按钮时。问题是,当我查看控制台并启用了调试选项进行分析时,它会显示多次触发事件。为什么会发生这种情况?
以下是调试控制台日志:
- (IBAction)aboutURL:(id)sender {
[FIRAnalytics logEventWithName:kFIREventSelectContent
parameters:@{
kFIRParameterItemID:[NSString stringWithFormat:@"id-1"],
kFIRParameterItemName:@"Tapped Not Karlton Keyboard Tutorial Button",
kFIRParameterContentType:@"button"
}];
KeyboardTutorialViewController *keyboardTutorialViewController = [[KeyboardTutorialViewController alloc] init];
[self.navigationController pushViewController:keyboardTutorialViewController animated:YES];
}
这是我的代码:
{{1}}