From ce731b958aab62672f401669faff04dcb0d7a504 Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Tue, 9 Jul 2019 16:45:31 -0600 Subject: [PATCH] Send tracks event when advanced filter match type is changed. --- .../client/analytics/components/report-filters/index.js | 3 +++ .../packages/components/src/filters/advanced/index.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js b/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js index 2f51849a2f9..356205fc4a5 100644 --- a/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js +++ b/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js @@ -54,6 +54,9 @@ export default class ReportFilters extends Component { case 'clear_all': recordEvent( 'analytics_filters_clear_all', { report } ); break; + case 'match': + recordEvent( 'analytics_filters_all_any', { report, value: data.match } ); + break; } } diff --git a/plugins/woocommerce-admin/packages/components/src/filters/advanced/index.js b/plugins/woocommerce-admin/packages/components/src/filters/advanced/index.js index a9c19a980e9..8b4ad3a36e6 100644 --- a/plugins/woocommerce-admin/packages/components/src/filters/advanced/index.js +++ b/plugins/woocommerce-admin/packages/components/src/filters/advanced/index.js @@ -75,7 +75,11 @@ class AdvancedFilters extends Component { } onMatchChange( match ) { + const { onAdvancedFilterAction } = this.props; + this.setState( { match } ); + + onAdvancedFilterAction( 'match', { match } ); } onFilterChange( key, property, value ) {