woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
262 stars 107 forks source link

[Woo POS] Track number of cancelled Payment Intents #13177

Open jaclync opened 1 week ago

jaclync commented 1 week ago

We have been discussing whether we should prepare the card reader for payment immediately after the user enters the checkout screen or if we should add a CTA instead. We decided to start with the fastest-UX first (without CTA) but measure the number of cancelled PIs to better understand how often do users change the order after they enter the checkout screen.

The goal of this task is to add tracking which will help us understand how often and how many PIs are cancelled.

More context on pdfdoF-54W-p2#comment-6189.

dangermattic commented 1 week ago

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

jaclync commented 6 days ago

This is where payment intent cancellation is triggered in POS:

https://github.com/woocommerce/woocommerce-ios/blob/64c579a6d5f8e038cd149638667ae60714403f65/WooCommerce/Classes/POS/Card%20Present%20Payments/CardPresentPaymentInvalidatablePaymentOrchestrator.swift#L49

CardPresentPaymentInvalidatablePaymentOrchestrator, a wrapper of PaymentCaptureOrchestrator, is only used in POS right now. The existing app is using PaymentCaptureOrchestrator directly.

I think it'd be ideal to work on this after having an analytics plan that is shared with Android.