Skip to content

Commit aa96dba

Browse files
authored
[Woo POS][Barcodes] Track when a barcode scanning menu item is tapped (#15820)
2 parents 96b814d + 63c55b4 commit aa96dba

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

WooCommerce/Classes/Analytics/TracksProvider.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ private extension TracksProvider {
148148
WooAnalyticsStat.pointOfSaleKeyboardDismissedInSearch,
149149
WooAnalyticsStat.pointOfSaleItemsNextPageLoaded,
150150
WooAnalyticsStat.pointOfSaleSearchRemoteResultsFetched,
151+
WooAnalyticsStat.pointOfSaleBarcodeScanningMenuItemTapped,
152+
WooAnalyticsStat.pointOfSaleBarcodeScanningExplanationDialogShown,
151153

152154
// Order
153155
WooAnalyticsStat.orderCreationSuccess,

WooCommerce/Classes/Analytics/WooAnalyticsStat.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,8 @@ enum WooAnalyticsStat: String {
13021302
case pointOfSaleKeyboardDismissedInSearch = "keyboard_dismissed_in_search"
13031303
case pointOfSaleItemsNextPageLoaded = "items_next_page_loaded"
13041304
case pointOfSaleSearchRemoteResultsFetched = "search_remote_results_fetched"
1305+
case pointOfSaleBarcodeScanningMenuItemTapped = "barcode_scanning_menu_item_tapped"
1306+
case pointOfSaleBarcodeScanningExplanationDialogShown = "barcode_scanning_explanation_dialog_shown"
13051307

13061308
// MARK: Custom Fields events
13071309
case productDetailCustomFieldsTapped = "product_detail_custom_fields_tapped"

WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct POSFloatingControlView: View {
6060
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.pointOfSaleBarcodeScanningi1) {
6161
Button {
6262
showBarcodeScanningInformation = true
63+
ServiceLocator.analytics.track(.pointOfSaleBarcodeScanningMenuItemTapped)
6364
} label: {
6465
Label(
6566
title: { Text(Localization.barcodeScanning) },

WooCommerce/Classes/POS/Presentation/PointOfSaleBarcodeScannerInformationModal.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ struct PointOfSaleBarcodeScannerInformationModal: View {
3030
Text(AttributedString(Localization.barcodeInfoQuinaryMessage))
3131
}
3232
}
33+
.onAppear(perform: {
34+
ServiceLocator.analytics.track(.pointOfSaleBarcodeScanningExplanationDialogShown)
35+
})
3336
}
3437

3538
private var bulletPointWithLink: AttributedString {

0 commit comments

Comments
 (0)