-
Notifications
You must be signed in to change notification settings - Fork 137
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
base: trunk
Are you sure you want to change the base?
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13323 +/- ##
============================================
- Coverage 41.08% 41.01% -0.07%
- Complexity 6422 6464 +42
============================================
Files 1322 1324 +2
Lines 77249 77489 +240
Branches 10660 10660
============================================
+ Hits 31740 31785 +45
- Misses 42693 42888 +195
Partials 2816 2816 ☔ View full report in Codecov by Sentry. |
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
StoreManagementPaymentsFlowTrackerEventProvider
andWooPosPaymentsFlowTrackerEventProvider
. The first one providesIAnalyticsEvent
withisPosEvent
property set tofalse
, while the second one provides events withisPosEvent
property set totrue
.PaymentsFlowTrackerEventProvider
is injected into thePaymentsFlowTracker
tracker class at the compile time, using the newly introduced qualifier annotations:@PointOfSaleMode
and@ 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_pos
prefix.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.txt
if 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: