woocommerce / woocommerce-blocks

(Deprecated) This plugin has been merged into woocommerce/woocommerce
https://wordpress.org/plugins/woo-gutenberg-products-block/
GNU General Public License v3.0
404 stars 218 forks source link

Add new event properties to product checkout and purchase Tracks events #9729

Closed pmcpinto closed 1 year ago

pmcpinto commented 1 year ago

Description: we want to add new event properties to the woocommerceanalytics_product_checkout and woocommerceanalytics_product_purchase Tracks events to develop a better understanding of the options that stores have available on cart and checkout, how shoppers interact with them, and how this impacts conversion. The events are triggered through the woocommerce-analytics module. This will need to be implemented in the Jetpack repo. More info about prior art here: pb0Spc-ou-p2#comment-701

opr commented 1 year ago

@pmcpinto - looking at the coupon_used property, it is unclear whether this should be a boolean or if you want a list of all coupons applied on that cart?

Also, if we're tracking order_value do you want to track the store currency too?

pmcpinto commented 1 year ago

@pmcpinto - looking at the coupon_used property, it is unclear whether this should be a boolean or if you want a list of all coupons applied on that cart?

It should be a boolean.

Also, if we're tracking order_value do you want to track the store currency too?

Store currency can be a nice addition. I'll update the acceptance criteria. Thanks

opr commented 1 year ago

Similar to the discussion in https://github.com/woocommerce/woocommerce-blocks/issues/9250#issuecomment-1697827620 regarding

shipping_option: the selected shipping option

We may not know this at the point the woocommerceanalytics_product_checkout is recorded.

Also, it's possible that there will be multiple packages each with its own shipping option, so I feel we should record this as an array at all times, with one entry per package (there will always be at least one package if there's a shippable product), and an empty array if only virtual products are in the cart.

pmcpinto commented 1 year ago

Let's go with an array. Thanks!

pmcpinto commented 1 year ago

hey @opr when will this be merged and shipped?

opr commented 1 year ago

Hey @pmcpinto it's currently being reviewed in Jetpack, https://github.com/Automattic/jetpack/pull/33544 - there's an issue with E2E tests but when we resolve that it should be shipped with the next Jetpack release, I think that'll be next month now.

pmcpinto commented 1 year ago

Thanks for the update!

opr commented 1 year ago

@pmcpinto https://github.com/Automattic/jetpack/pull/33544 has been merged