File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
WooCommerce/Classes/Analytics Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,29 @@ extension WooAnalyticsEvent {
88 static let dateRange = " date_range "
99 static let product = " product "
1010 static let customer = " customer "
11+ static let salesChannel = " sales_channel "
1112 }
1213
1314 /// Tracked upon filtering orders
1415 static func onFilterOrders( filters: FilterOrderListViewModel . Filters ) -> WooAnalyticsEvent {
1516 let properties : [ String : WooAnalyticsEventPropertyType ? ] = [ Key . status: filters. orderStatus? . analyticsDescription,
1617 Key . dateRange: filters. dateRange? . analyticsDescription,
1718 Key . product: filters. product? . analyticsDescription,
18- Key . customer: filters. customer? . analyticsDescription]
19+ Key . customer: filters. customer? . analyticsDescription,
20+ Key . salesChannel: filters. salesChannel? . analyticsDescription]
1921 return WooAnalyticsEvent ( statName: . ordersListFilter,
2022 properties: properties. compactMapValues { $0 } )
2123 }
2224 }
2325}
26+
27+ fileprivate extension FilterOrderListViewModel . SalesChannelFilter {
28+ var analyticsDescription : String ? {
29+ switch self {
30+ case . pointOfSale:
31+ return " pos "
32+ case . any:
33+ return nil
34+ }
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments