Implement analytics for threads

This commit is contained in:
ismailgulek
2022-02-28 17:46:57 +03:00
parent 53588b7910
commit 3f1f75f7ce
2 changed files with 10 additions and 0 deletions
@@ -63,6 +63,8 @@ final class ThreadListViewController: UIViewController {
self.viewModel.viewDelegate = self
self.viewModel.process(viewAction: .loadData)
Analytics.shared.trackScreen(.threadList)
}
override func viewWillAppear(_ animated: Bool) {
@@ -290,6 +292,8 @@ final class ThreadListViewController: UIViewController {
@objc
private func filterButtonTapped(_ sender: UIBarButtonItem) {
self.viewModel.process(viewAction: .showFilterTypes)
Analytics.shared.trackInteraction(.threadListFilterItem)
}
@IBAction private func longPressed(_ sender: UILongPressGestureRecognizer) {
@@ -355,6 +359,8 @@ extension ThreadListViewController: UITableViewDelegate {
tableView.deselectRow(at: indexPath, animated: true)
viewModel.process(viewAction: .selectThread(indexPath.row))
Analytics.shared.trackInteraction(.threadListThreadItem)
}
}