Skip to content

Conversation

kidinov
Copy link
Contributor

@kidinov kidinov commented Aug 21, 2025

WOOMOB-1128

Description

Implement analytics tracking for Woo POS settings interactions. This adds tracking for various user actions including settings opened/closed events, navigation to different settings sections (store details, hardware, help), and empty cart setup scanner tapped event.

Steps to reproduce

  1. Open Woo POS settings
  2. Navigate to different settings sections (Store Details, Hardware, Help)
  3. Tap on empty cart setup scanner button
  4. Check analytics to verify events are being tracked
Tracked: woocommerceandroid_pos_empty_cart_set_up_scanner_tapped, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Tracked: woocommerceandroid_pos_settings_opened, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Tracked: woocommerceandroid_pos_hardware_tapped, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Tracked: woocommerceandroid_pos_store_details_tapped, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Tracked: woocommerceandroid_pos_settings_closed, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Tracked: woocommerceandroid_pos_help_tapped, Properties: {"blog_id":198219640,"is_wpcom_store":true,"was_ecommerce_trial":false,"plan_product_slug":"business-bundle","store_id":"f7681b0f-a272-4402-9520-0b1471736552","is_debug":true,"site_url":"https:\/\/anotherpaymentssite.wpcomstaging.com","cached_woo_core_version":"10.1.1"}

Testing information

  • Tested analytics event tracking for settings navigation
  • Verified events are properly logged for all implemented actions
  • Confirmed analytics events follow existing patterns in the codebase

The tests that have been performed

  • Manual testing of all analytics events
  • Verified event parameters and tracking implementation
  • Tested on debug builds to confirm analytics integration

Images/gif

No visual changes - analytics implementation only.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit23a8c8f
Direct Downloadwoocommerce-wear-prototype-build-pr14497-23a8c8f.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit23a8c8f
Direct Downloadwoocommerce-prototype-build-pr14497-23a8c8f.apk

@kidinov kidinov requested a review from samiuelson August 21, 2025 12:52
@kidinov kidinov added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Aug 21, 2025
@kidinov kidinov added this to the 23.2 milestone Aug 21, 2025
@kidinov kidinov marked this pull request as ready for review August 21, 2025 12:52
@samiuelson samiuelson requested a review from Copilot August 22, 2025 12:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Implements analytics tracking for Woo POS settings interactions, adding event tracking for user navigation and interactions within the settings flow.

  • Added analytics events for settings lifecycle (opened/closed) and navigation actions
  • Integrated tracking for settings category selections (store details, hardware, help)
  • Added analytics for empty cart scanner setup button interactions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
WooPosAnalyticsEvent.kt Defines new analytics event types for settings interactions
WooPosSettingsViewModel.kt Implements analytics tracking logic for settings navigation
WooPosSettingsScreen.kt Triggers analytics events for settings lifecycle
WooPosCartViewModel.kt Adds analytics tracking for empty cart scanner setup button

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from woomob-1032-woo-possettings-move-barcode-scanners-button-to-the-empty to trunk August 25, 2025 13:02
@kidinov kidinov removed the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Aug 25, 2025
…tics-events

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/cart/WooPosCartViewModel.kt
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/settings/WooPosSettingsScreen.kt
@kidinov kidinov enabled auto-merge August 25, 2025 13:48
@kidinov kidinov merged commit 313cd18 into trunk Aug 25, 2025
16 of 17 checks passed
@kidinov kidinov deleted the woomob-1128-woo-possettings-implement-analytics-events branch August 25, 2025 14:42
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.88%. Comparing base (78062de) to head (23a8c8f).
⚠️ Report is 47 commits behind head on trunk.

Files with missing lines Patch % Lines
...roid/ui/woopos/settings/WooPosSettingsViewModel.kt 0.00% 20 Missing ⚠️
...d/ui/woopos/util/analytics/WooPosAnalyticsEvent.kt 0.00% 12 Missing ⚠️
...android/ui/woopos/home/cart/WooPosCartViewModel.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #14497      +/-   ##
============================================
- Coverage     37.89%   37.88%   -0.02%     
+ Complexity     9363     9362       -1     
============================================
  Files          2024     2024              
  Lines        113790   113824      +34     
  Branches      15093    15093              
============================================
- Hits          43125    43124       -1     
- Misses        66699    66733      +34     
- Partials       3966     3967       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants