Add profiler step view tracks (https://github.com/woocommerce/woocommerce-admin/pull/4141)
* 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:
parent
8e22e30228
commit
acd158057c
|
@ -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' ) &&
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue