From 29a46f0665dffcf6ba828aa4c0cdfc42a4abf465 Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Wed, 10 Jul 2019 16:42:02 -0600 Subject: [PATCH] Send a tracks event for reordering dashboard sections. --- plugins/woocommerce-admin/client/dashboard/customizable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/woocommerce-admin/client/dashboard/customizable.js b/plugins/woocommerce-admin/client/dashboard/customizable.js index 7c7002e8adb..38b79d4a475 100644 --- a/plugins/woocommerce-admin/client/dashboard/customizable.js +++ b/plugins/woocommerce-admin/client/dashboard/customizable.js @@ -127,6 +127,12 @@ class CustomizableDashboard extends Component { // Yes, lets insert. sections.splice( newIndex, 0, movedSection ); this.updateSections( sections ); + + const eventProps = { + key: movedSection.key, + direction: 0 < change ? 'down' : 'up', + }; + recordEvent( 'dash_section_order_change', eventProps ); } else { // No, lets try the next one. this.onMove( index, change + change );