Add Onboarding Heuristics Tracks Event (#37767)
* Add heuristics data to onboarding setting * Add track * Add Tracks event
This commit is contained in:
parent
f6685b88b9
commit
4fca6d1f63
|
@ -96,6 +96,14 @@ class Industry extends Component {
|
|||
return this.state.selected.map( ( industry ) => industry.slug );
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
recordEvent( 'onboarding_site_heuristics', {
|
||||
page_count: onboarding.pageCount,
|
||||
post_count: onboarding.postCount,
|
||||
is_block_theme: onboarding.isBlockTheme,
|
||||
} );
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.props.updateCurrentStepValues(
|
||||
this.props.step.key,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Add tracks event to gather onboarding heuristics
|
|
@ -230,6 +230,9 @@ class OnboardingSetupWizard {
|
|||
$settings['onboarding']['euCountries'] = WC()->countries->get_european_union_countries();
|
||||
$settings['onboarding']['localeInfo'] = include WC()->plugin_path() . '/i18n/locale-info.php';
|
||||
$settings['onboarding']['profile'] = $profile;
|
||||
$settings['onboarding']['pageCount'] = (int) ( wp_count_posts( 'page' ) )->publish;
|
||||
$settings['onboarding']['postCount'] = (int) ( wp_count_posts( 'post' ) )->publish;
|
||||
$settings['onboarding']['isBlockTheme'] = wc_current_theme_is_fse_theme();
|
||||
|
||||
return apply_filters( 'woocommerce_admin_onboarding_preloaded_data', $settings );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue