Skip to content

Commit

Permalink
Support: Track how often ticket config is requested (#41571)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwondra authored Apr 29, 2020
1 parent 817f652 commit 7978d23
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client/state/help/ticket/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down

0 comments on commit 7978d23

Please sign in to comment.