diff --git a/client/analytics/super-props.js b/client/analytics/super-props.js index eb45b4999a5806..1bd13aa333fb01 100644 --- a/client/analytics/super-props.js +++ b/client/analytics/super-props.js @@ -14,7 +14,7 @@ module.exports = { siteProps = {}, defaultProps = { environment: config( 'env' ), - site_count: sites.data.length, + site_count: sites.data ? sites.data.length : 0, site_id_label: 'wpcom', client: config( 'tracks_client_prop' ) }; diff --git a/client/boot/index.js b/client/boot/index.js index 210f7660ff5d67..6e61144489370e 100644 --- a/client/boot/index.js +++ b/client/boot/index.js @@ -169,6 +169,8 @@ function boot() { translatorInvitation: translatorInvitation } ), document.getElementById( 'wpcom' ) ); } else { + analytics.setSuperProps( superProps ); + if ( config.isEnabled( 'oauth' ) ) { LoggedOutLayout = require( 'layout/logged-out-oauth' ); } else {