Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Sep 10, 2025

Part of WOOMOB-1125

Description

This PR adds support to track request authentication type for analytics purposes. The type is only sent in orders_list_loaded event as this is the most used feature in the app. We'll use this property to analyze the performance of the order list request and compare the result between Jetpack-proxied and direct requests similar to this post: pe5sF9-4me-p2.

Changes:

  • Adds new property in AlamofireNetwork to determine the current request authentication type.
  • Updates AuthenticatedState and StoresManager to make it possible to check for authentication type.
  • Sends new property request_type to order_list_loaded event.

Testing steps

TC1: Application password authenticated

  1. Log in to a self-hosted store with site credentials (native or web flows).
  2. Navigate to the Orders tab to load orders.
  3. Confirm that order_list_loaded is tracked with request_type: app_passwords.

TC2: WPCom authenticated.

  1. Log in to a Jetpack store with WPCom credentials. Ensure that the site has app password enabled.
  2. Navigate to the Orders tab to load orders.
  3. Confirm that order_list_loaded is tracked with app_passwords_with_jetpack.
  4. Navigate to Menu > Settings > Experimental features > disable app password experiment.
  5. Navigate back to the Orders tab and refresh the list.
  6. Confirm that order_list_loaded is tracked with jetpack_tunnel .

Testing information

Tested the above cases with simulator iPhone 16 iOS 18.2

Screenshots

N/A


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

@itsmeichigo itsmeichigo added this to the 23.3 milestone Sep 10, 2025
@itsmeichigo itsmeichigo added type: task An internally driven task. category: tracks Related to analytics, including Tracks Events. labels Sep 10, 2025
@itsmeichigo itsmeichigo changed the title Jetpack sites improvement: Tracking Tracking for request authentication switching Sep 10, 2025
@wpmobilebot
Copy link
Collaborator

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 Numberpr16112-5ff1e80
Version23.2
Bundle IDcom.automattic.alpha.woocommerce
Commit5ff1e80
Installation URL44pdnct1d3mn0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo changed the title Tracking for request authentication switching Tracking request authentication type for order list loading Sep 10, 2025
@itsmeichigo itsmeichigo marked this pull request as ready for review September 10, 2025 11:09
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

LGTM. Tested, works as described.

@itsmeichigo itsmeichigo merged commit 7a59c61 into trunk Sep 11, 2025
27 checks passed
@itsmeichigo itsmeichigo deleted the woomob-1125-add-tracking branch September 11, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants