@@ -83,9 +83,10 @@ extension OrderSearchStarterViewController: UITableViewDataSource {
8383extension OrderSearchStarterViewController : UITableViewDelegate {
8484
8585 func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
86+ let cellViewModel = viewModel. cellViewModel ( at: indexPath)
8687 let orderStatus = viewModel. orderStatus ( at: indexPath)
8788
88- analytics. trackSelectionOf ( orderStatus : orderStatus )
89+ analytics. trackSelectionOf ( orderStatusSlug : cellViewModel . slug )
8990
9091 let ordersViewController = OrdersViewController (
9192 title: orderStatus. name ?? NSLocalizedString ( " Orders " , comment: " Default title for Orders List shown when tapping on the Search filter. " ) ,
@@ -111,8 +112,8 @@ extension OrderSearchStarterViewController: KeyboardScrollable {
111112private extension Analytics {
112113 /// Submit events depicting selection of an `OrderStatus` in the UI.
113114 ///
114- func trackSelectionOf( orderStatus : OrderStatus ) {
115- track ( . filterOrdersOptionSelected, withProperties: [ " status " : orderStatus . slug ] )
116- track ( . ordersListFilterOrSearch, withProperties: [ " filter " : orderStatus . slug , " search " : " " ] )
115+ func trackSelectionOf( orderStatusSlug : String ) {
116+ track ( . filterOrdersOptionSelected, withProperties: [ " status " : orderStatusSlug ] )
117+ track ( . ordersListFilterOrSearch, withProperties: [ " filter " : orderStatusSlug , " search " : " " ] )
117118 }
118119}
0 commit comments