Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Conversation

@octaedro
Copy link
Contributor

@octaedro octaedro commented Jul 26, 2020

Fixes #4432

This PR adds event recording to the Orders, Stock, and Reviews panels.

Accessibility

Detailed test instructions:

screenshot-one wordpress test-2020 07 26-18_50_03

  • Open the order panel
  • Verify the following events are tracked correctly.
  • Executing this sentence in the browser console may help to verify it:
localStorage.setItem( 'debug', 'wc-admin:*' )

Orders panel:

Event name: wcadmin_activity_panel_orders_begin_fulfillment
Event prop: NA
Description: when the user clicks in the "Begin fulfillment" button

Event name: wcadmin_activity_panel_orders_manage
Event prop: NA
Description: when the user clicks in the "Manage all orders" button

Event name: wcadmin_activity_panel_order_number
Event prop: NA
Description: when the user clicks in the order number link

Event name: wcadmin_activity_panel_customer_name
Event prop: NA
Description: when the user clicks in the customer name link

screenshot-one wordpress test-2020 07 26-18_51_43 (1)

  • Open the stock panel
  • Verify the following events are tracked correctly.

Stock:

Event name: wcadmin_activity_panel_stock_product_name
Event prop: NA
Description: when the user clicks in the product name link

Event name: wcadmin_activity_panel_stock_update_stock
Event prop: NA
Description: when the user clicks in the "Update stock" button

Event name: wcadmin_activity_panel_stock_save
Event prop: quantity, the number of products added to the inventory
Description: when the user clicks in the "Save" button

Event name: wcadmin_activity_panel_stock_cancel
Event prop: NA
Description: when the user clicks in the "Cancel" button

screenshot-one wordpress test-2020 07 26-18_51_43

  • Open the reviews panel
  • Verify the following events are tracked correctly.

Reviews:

Event name: wcadmin_activity_panel_reviews_learn_more
Event prop: NA
Description: when the user clicks in the "Learn More" button in the empty state

Event name: wcadmin_activity_panel_reviews_view_reviews
Event prop: NA
Description: when the user clicks in the "View reviews" button in the empty state

Event name: wcadmin_activity_panel_reviews_product
Event prop: NA
Description: when the user clicks in the product name

Event name: wcadmin_activity_panel_reviews_customer
Event prop: NA
Description: when the user clicks in the customer name

Changelog Note:

Dev: Added event recording to Orders, Stock, and Reviews panels.

@octaedro octaedro added status: in progress focus: activity panel Issues about activity/task panels on the home screen. labels Jul 26, 2020
@octaedro octaedro self-assigned this Jul 26, 2020
@octaedro octaedro requested a review from a team July 27, 2020 17:16
Copy link
Contributor

@jeffstieler jeffstieler left a comment

Choose a reason for hiding this comment

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

This tested well and the code looks good. Curious - why didn't the "learn more" button in the empty Orders panel get any tracking?

<Link
href={ customerUrl }
onClick={ () =>
this.recordOrderEvent( 'customer_name' )
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is what the issue requested, but it seems like it should be prefixed with order_ to avoid ambiguity.


updateProductStock( product, quantity );
this.recordStockEvent( 'save', {
quantity,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe more of a question for @pmcpinto - what is the value/use of knowing the stock quantity being modified? Without any context it seems rather useless.. and to be clear I'm not advocating for adding more data to this event.

@jeffstieler jeffstieler added needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. [Status] Ready to Merge and removed [Status] Needs Review labels Jul 29, 2020
@pmcpinto
Copy link

This tested well and the code looks good. Curious - why didn't the "learn more" button in the empty Orders panel get any tracking?

I missed that one 😞 It would be good to include it. @octaedro

what is the value/use of knowing the stock quantity being modified? Without any context it seems rather useless.. and to be clear I'm not advocating for adding more data to this event.

The main goal is to understand if the feature is being used and if the job is being completed (open the stock panel > click update stock > save the new stock).

@octaedro
Copy link
Contributor Author

I missed that one 😞 It would be good to include it. @octaedro

No problem @pmcpinto, I will add it.

Also, I wanted to ask you if it is ok to add what Jeff suggested about adding a prefix order_ to the Orders event names?

@pmcpinto
Copy link

Also, I wanted to ask you if it is ok to add what Jeff suggested about adding a prefix order_ to the Orders event names?

Sure, go ahead. Thanks!

@octaedro
Copy link
Contributor Author

octaedro commented Aug 3, 2020

As the new event recording was added, I did a rebase and merged this PR.

@octaedro octaedro removed the needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. label Aug 3, 2020
@octaedro octaedro merged commit c4a8529 into main Aug 3, 2020
@octaedro octaedro deleted the add/4432 branch August 3, 2020 16:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

focus: activity panel Issues about activity/task panels on the home screen.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Panel - improve event tracking

4 participants