Skip to content

Commit

Permalink
Add Tracks event to Creative Mail install (#17260)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertf4 committed Sep 25, 2020
1 parent 645d183 commit ca30cfd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion _inc/client/setup-wizard/feature-toggle/index.jsx
Expand Up @@ -94,8 +94,11 @@ let FeatureToggle = props => {
setIsInstalling( true );
onInstallClick().then( () => {
setIsInstalling( false );
analytics.tracks.recordEvent( 'jetpack_wizard_feature_install', {
feature,
} );
} );
} );
}, [ feature ] );

let buttonContent;
if ( ! checked && upgradeLink ) {
Expand Down
Expand Up @@ -330,9 +330,11 @@ const features = {
},
mapDispatchToProps: dispatch => {
const installAndRefreshPluginData = () => {
restApi.installPlugin( 'creative-mail-by-constant-contact', 'setup-wizard' ).then( () => {
dispatch( fetchPluginsData() );
} );
return restApi
.installPlugin( 'creative-mail-by-constant-contact', 'setup-wizard' )
.then( () => {
dispatch( fetchPluginsData() );
} );
};

return {
Expand Down

0 comments on commit ca30cfd

Please sign in to comment.