Skip to content

Conversation

@iamgabrielma
Copy link
Contributor

@iamgabrielma iamgabrielma commented Jul 10, 2025

Closes WOOMOB-705

Description

This PR adds analytics when filtering orders by POS. We add sales_channel: pos to the existing orders_list_filter event if POS as sales channel has been selected for filtering orders.

Screen.Recording.2025-07-10.at.17.07.03.mov

Testing information

  • In order filters, Sales Channel > Point of sale, tap Show Orders. Observe the property sales_channel: pos is tracked
🔵 Tracked orders_list_filter, properties: [sales_channel: pos, blog_id: -1, store_id: c5bd46cc-1804-4f7b-badb-bb98c449127f, is_wpcom_store: false, site_url: https://indiemelon.mystagingwebsite.com, plan: , was_ecommerce_trial: false]
  • Now select Any, tap Show Orders. Observe the property sales_channel is not tracked
🔵 Tracked orders_list_filter, properties: [blog_id: -1, is_wpcom_store: false, was_ecommerce_trial: false, plan: , store_id: c5bd46cc-1804-4f7b-badb-bb98c449127f, site_url: https://indiemelon.mystagingwebsite.com]
  • Try some combiation with other filters, as long as Point of sale is an active filter, it should be tracked.
🔵 Tracked orders_list_filter, properties: [was_ecommerce_trial: false, is_wpcom_store: false, date_range: last_7_days, sales_channel: pos, site_url: https://indiemelon.mystagingwebsite.com, status: completed, plan: , blog_id: -1, store_id: c5bd46cc-1804-4f7b-badb-bb98c449127f]

@iamgabrielma iamgabrielma added this to the 22.8 milestone Jul 10, 2025
@iamgabrielma iamgabrielma added type: task An internally driven task. feature: order list Related to the order list. category: tracks Related to analytics, including Tracks Events. feature: POS labels Jul 10, 2025
@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 Numberpr15890-26e679b
Version22.7
Bundle IDcom.automattic.alpha.woocommerce
Commit26e679b
Installation URL0kr80vei4e61g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iamgabrielma iamgabrielma marked this pull request as ready for review July 10, 2025 10:06
@iamgabrielma iamgabrielma requested a review from jaclync July 10, 2025 10:09
@iamgabrielma
Copy link
Contributor Author

👋 There is no rush to wrap this one before 22.8, it can wait till next week.

Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

non-blocking: I was wondering how we differentiate the lack of the new event property because it's not available (release version, WC version) vs. the filter set to "Any." This can make it tricky to answer the analytics question like the % of stores set the sales channel filter to POS, since the base number includes stores not seeing the filter. If this is something we want to know, we can track the "any" option for the event property whenever the event is tracked.

}
}

var analyticsDescription: String? {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this could be an extension of FilterOrderListViewModel.SalesChannelFilter in the analytics file, could be fileprivate as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, updated on 26e679b

@iamgabrielma iamgabrielma modified the milestones: 22.8, 22.9 Jul 11, 2025
Base automatically changed from task/WOOMOB-711-make-view-for-sales-channel-filter to trunk July 14, 2025 05:41
@iamgabrielma
Copy link
Contributor Author

Thanks for the review!

I was wondering how we differentiate the lack of the new event property because it's not available (release version, WC version) vs. the filter set to "Any." This can make it tricky to answer the analytics question like the % of stores set the sales channel filter to POS, since the base number includes stores not seeing the filter. If this is something we want to know, we can track the "any" option for the event property whenever the event is tracked.

Very good point, at the moment any is the same as nil filtering, but if we want to differentiate the lack of property vs being unset we need to handle it better. I'll raise this with Android as well and make a decision 👍

@iamgabrielma iamgabrielma enabled auto-merge July 14, 2025 06:16
@iamgabrielma iamgabrielma merged commit 954ea45 into trunk Jul 14, 2025
13 checks passed
@iamgabrielma iamgabrielma deleted the task/WOOMOB-705-pos-order-tracks branch July 14, 2025 06: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. feature: order list Related to the order list. feature: POS type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants