From 7978d23c8afc03c03091597d0f6b5ea89d5faa0b Mon Sep 17 00:00:00 2001 From: Matt Wondra Date: Tue, 28 Apr 2020 23:57:36 -0500 Subject: [PATCH] Support: Track how often ticket config is requested (#41571) --- client/state/help/ticket/actions.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/state/help/ticket/actions.js b/client/state/help/ticket/actions.js index 162653f7e4b7d..19417f05c15ca 100644 --- a/client/state/help/ticket/actions.js +++ b/client/state/help/ticket/actions.js @@ -9,6 +9,7 @@ import { HELP_TICKET_CONFIGURATION_REQUEST_FAILURE, HELP_TICKET_CONFIGURATION_DISMISS_ERROR, } from 'state/action-types'; +import { recordTracksEvent, withAnalytics } from 'state/analytics/actions'; export const ticketSupportConfigurationRequestSuccess = ( configuration ) => { return { @@ -25,7 +26,16 @@ export const ticketSupportConfigurationRequestFailure = ( error ) => { }; export const ticketSupportConfigurationRequest = () => ( dispatch ) => { - dispatch( { type: HELP_TICKET_CONFIGURATION_REQUEST } ); + const requestAction = { + type: HELP_TICKET_CONFIGURATION_REQUEST, + }; + + dispatch( + withAnalytics( + recordTracksEvent( 'calypso_ticket_support_configuration_requested' ), + requestAction + ) + ); return wpcom .undocumented()