-
Notifications
You must be signed in to change notification settings - Fork 136
[Woo POS] Track POS-specific analytics events in reader payment flow #13323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Woo POS] Track POS-specific analytics events in reader payment flow #13323
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
…ader-payment-flow-to-start-with-woocommerceandroid_pos-prefix
…-flow-to-start-with-woocommerceandroid_pos-prefix' into woo-pos-update-payment-canceled-analytics-event
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13323 +/- ##
============================================
- Coverage 41.17% 41.10% -0.08%
- Complexity 6442 6484 +42
============================================
Files 1323 1325 +2
Lines 77259 77499 +240
Branches 10669 10669
============================================
+ Hits 31813 31856 +43
- Misses 42617 42814 +197
Partials 2829 2829 ☔ View full report in Codecov by Sentry. |
WooCommerce/src/main/kotlin/com/woocommerce/android/di/AppModeModule.kt
Outdated
Show resolved
Hide resolved
kidinov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the idea! LGTM!
…ader-payment-flow-to-start-with-woocommerceandroid_pos-prefix
…-flow-to-start-with-woocommerceandroid_pos-prefix' into woo-pos-update-payment-canceled-analytics-event
…celed-analytics-event [Woo POS] Track POS-specific analytics event in case of reader payment flow cancellation
…ader-payment-flow-to-start-with-woocommerceandroid_pos-prefix
Closes: #13302
Description
This PR modifies analytics tracking code to use a POS-specific prefix (
woocommerce_android_pos) in case the payment flow (CardReaderPaymentController) is used from Point of Sale.Implementation details
StoreManagementPaymentsFlowTrackerEventProviderandWooPosPaymentsFlowTrackerEventProvider. The first one providesIAnalyticsEventwithisPosEventproperty set tofalse, while the second one provides events withisPosEventproperty set totrue.PaymentsFlowTrackerEventProvideris injected into thePaymentsFlowTrackertracker class at the compile time, using the newly introduced qualifier annotations:@PointOfSaleModeand@ StoreManagementMode.Steps to reproduce
The goal is to verify that during card payment flow the events we track in IPP start with
woocommerce_android_, and the ones in POS withwoocommerce_android_posprefix.Note: tracking of payment cancel event from POS is implemented in the next PR: https://github.com/woocommerce/woocommerce-android/pull/13333/files
Testing information
The tests that have been performed
I tested the card reader payment flow in POS and IPP modes and verified analytics events are tracked with proper prefixes,
woocommerce_android_pos_andwoocommerce_android_respectively.Images/gif
—
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: