Skip to content

Conversation

@staskus
Copy link
Contributor

@staskus staskus commented Jul 10, 2025

Track gatewayID, countryCode, paymentMethod, cardReaderModel, and siteID to match IPP and Android implementation

WOOMOB-776

Description

Track more details with POS card present, collect payment success event
Track gatewayID, countryCode, paymentMethod, cardReaderModel, and siteID to match IPP and Android implementation

Steps to reproduce

  1. Open POS
  2. Connect a card reader
  3. Make a card payment payment
  4. Confirm pos_card_present_collect_payment_success is tracked with gatewayID, countryCode, paymentMetho, cardReaderModel, and siteID

Testing information

Tested on iPad Air M2 26.0

Tracked pos_card_present_collect_payment_success, properties: [is_wpcom_store: false, milliseconds_since_reader_ready_to_collect_payment: 11134.0, milliseconds_since_order_sync_success: 21793.0, was_ecommerce_trial: false, store_id: 5f1b17dc-90f9-4db8-a1e8-8f3301fbb2c3, milliseconds_since_customer_interaction_started: 25562.0, checkout_tap_count: 1, card_reader_model: STRIPE_M2, milliseconds_since_card_tapped: 9757.0, plugin_slug: woocommerce-payments, site_url: https://testpovilasstore.mystagingwebsite.com, country: US, payment_method_type: card, blog_id: 234565615, site_id: 234565615, plan: jetpack_security_t1_yearly]

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Track gatewayID, countryCode, paymentMethod, cardReaderModel, and siteID to match IPP and Android implementation
@staskus staskus added this to the 22.8 milestone Jul 10, 2025
@staskus staskus requested a review from iamgabrielma July 10, 2025 11:22
@staskus staskus added type: task An internally driven task. feature: point of sale labels Jul 10, 2025
@staskus staskus changed the title [Woo POS] iOS payment analytics events exclude important parameters [Woo POS] Include more information in pos_card_present_collect_payment_success event Jul 10, 2025
@dangermattic
Copy link
Collaborator

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is assigned to the milestone 22.8. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jul 10, 2025

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

App NameWooCommerce iOS Prototype
Build Numberpr15892-030b0a5
Version22.7
Bundle IDcom.automattic.alpha.woocommerce
Commit030b0a5
Installation URL75s9uh4dkkvv0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iamgabrielma iamgabrielma self-assigned this Jul 10, 2025
Copy link
Contributor

@iamgabrielma iamgabrielma left a comment

Choose a reason for hiding this comment

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

Works well! Just a non-blocking question regarding site_id

  • Simulated device:
🔵 Tracked pos_card_present_collect_payment_success, properties: [milliseconds_since_reader_ready_to_collect_payment: 10226.0, site_id: -1, card_reader_model: CHIPPER_2X, site_url: https://indiemelon.mystagingwebsite.com, plugin_slug: woocommerce-payments, store_id: c5bd46cc-1804-4f7b-badb-bb98c449127f, was_ecommerce_trial: false, plan: , milliseconds_since_order_sync_success: 12718.0, country: US, is_wpcom_store: false, milliseconds_since_card_tapped: 8125.0, milliseconds_since_customer_interaction_started: 15913.0, payment_method_type: card, checkout_tap_count: 1, blog_id: -1]
  • Physical device
🔵 Tracked pos_card_present_collect_payment_success, properties: [is_wpcom_store: false, payment_method_type: card, milliseconds_since_card_tapped: 8652.0, plugin_slug: woocommerce-payments, plan: jetpack_security_daily, site_id: 215063064, site_url: https://indiemelon.mystagingwebsite.com, checkout_tap_count: 1, milliseconds_since_reader_ready_to_collect_payment: 12794.0, milliseconds_since_customer_interaction_started: 27798.0, was_ecommerce_trial: false, blog_id: 215063064, store_id: c5bd46cc-1804-4f7b-badb-bb98c449127f, country: US, card_reader_model: STRIPE_M2, milliseconds_since_order_sync_success: 24758.0]

countryCode: configuration.countryCode,
paymentMethod: capturedPaymentData.paymentMethod,
cardReaderModel: connectedReaderModel,
siteID: siteID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Do we need to track site_id explicitly? We already capture blog_id as part of the event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for flagging, I missed this detail. I used CollectOrderPaymentAnalytics as an example, but I didn't notice we track blog_id. Indeed, it doesn't look to be necessary

…entAnalyticsTests.swift

Co-authored-by: Gabriel Maldonado <[email protected]>
@staskus staskus enabled auto-merge July 10, 2025 19:12
@staskus staskus merged commit decc41e into trunk Jul 10, 2025
13 checks passed
@staskus staskus deleted the woomob-776-woo-pos-ios-payment-analytics-events-exclude-important branch July 10, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: point of sale type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants