File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -199,11 +199,13 @@ export default function ActionRenderModal( {
199
199
const { recordTracksEvent } = useAnalytics ( ) ;
200
200
201
201
useEffect ( ( ) => {
202
- recordTracksEvent ( `calypso_hosting_dashboard_plugins_ ${ actionId } _click` ) ;
202
+ recordTracksEvent ( 'calypso_dashboard_plugins_action_click' , { action_id : actionId } ) ;
203
203
} , [ actionId , recordTracksEvent ] ) ;
204
204
205
205
const handleCancel = ( ) => {
206
- recordTracksEvent ( `calypso_hosting_dashboard_plugins_${ actionId } _cancel_click` ) ;
206
+ recordTracksEvent ( 'calypso_dashboard_plugins_action_cancel_click' , {
207
+ action_id : actionId ,
208
+ } ) ;
207
209
closeModal ?.( ) ;
208
210
} ;
209
211
@@ -420,7 +422,9 @@ export default function ActionRenderModal( {
420
422
} ;
421
423
422
424
const handleConfirm = async ( ) => {
423
- recordTracksEvent ( `calypso_hosting_dashboard_plugins_${ actionId } _confirm_click` ) ;
425
+ recordTracksEvent ( 'calypso_dashboard_plugins_action_confirm_click' , {
426
+ action_id : actionId ,
427
+ } ) ;
424
428
setIsBusy ( true ) ;
425
429
try {
426
430
const { successCount, errorCount } = await onExecute ( items ) ;
Original file line number Diff line number Diff line change @@ -47,11 +47,10 @@ export default function FieldActionToggle( {
47
47
}
48
48
} }
49
49
onChange = { ( next ) => {
50
- recordTracksEvent (
51
- `calypso_hosting_dashboard_plugins_${ actionId } _toggle_${
52
- next ? 'enable' : 'disable'
53
- } _click`
54
- ) ;
50
+ recordTracksEvent ( 'calypso_dashboard_plugins_toggle_click' , {
51
+ action_id : actionId ,
52
+ next_state : next ? 'enable' : 'disable' ,
53
+ } ) ;
55
54
onToggle ( next )
56
55
. then ( ( ) => {
57
56
createSuccessNotice ( next ? successOn : successOff , { type : 'snackbar' } ) ;
You can’t perform that action at this time.
0 commit comments