Send a tracks event for reordering dashboard sections.

This commit is contained in:
Jeff Stieler 2019-07-10 16:42:02 -06:00
parent c68fdde2e5
commit 29a46f0665
1 changed files with 6 additions and 0 deletions

View File

@ -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 );