* Add profiler step view tracks

* Track plugins to install on benefits screen

* Use getCurrentStep method instead of prop query to check step
This commit is contained in:
Joshua T Flowers 2020-04-21 12:19:32 +03:00 committed by GitHub
parent 8e22e30228
commit acd158057c
2 changed files with 12 additions and 0 deletions

View File

@ -62,6 +62,10 @@ class ProfileWizard extends Component {
if ( prevStep !== step ) {
window.document.documentElement.scrollTop = 0;
recordEvent( 'storeprofiler_step_view', {
step: this.getCurrentStep().key,
} );
}
}
@ -73,6 +77,10 @@ class ProfileWizard extends Component {
document.body.classList.add( 'woocommerce-profile-wizard__body' );
document.body.classList.add( 'woocommerce-admin-full-screen' );
recordEvent( 'storeprofiler_step_view', {
step: this.getCurrentStep().key,
} );
// Track plugins if already installed.
if (
this.activePlugins.includes( 'woocommerce-services' ) &&

View File

@ -46,6 +46,10 @@ class Benefits extends Component {
this.pluginsToInstall.push( 'woocommerce-services' );
}
recordEvent( 'storeprofiler_plugins_to_install', {
plugins: this.pluginsToInstall,
} );
this.startPluginInstall = this.startPluginInstall.bind( this );
this.skipPluginInstall = this.skipPluginInstall.bind( this );
}