woocommerce-android
woocommerce-android copied to clipboard
[Analytics Hub] Sessions card not supported by default and displays an unclear error message for Hosted Woo sites
Jetpack Stats aren’t activated by default on WordPress.com eCommerce sites. (This was an intentional decision.) You have to actively go into Jetpack > Dashboard > Settings > Jetpack Stats to enable it. When it’s disabled, the Sessions card doesn’t load in the Analytics Hub:
The API sends a very specific error when the stats module is disabled, so a couple simple options to handle this:
- Detect when the stats module is disabled and hide the Sessions card. (This aligns with the web perspective that the Jetpack stats are not as useful for eCommerce sites.)
- Detect when the stats module is disabled and display an error message that’s more specific and action-oriented, e.g. explaining that the stats module needs to be enabled to see these stats.
Related iOS issue: https://github.com/woocommerce/woocommerce-ios/issues/10338
Summary of iOS changes: pe5pgL-4l9-p2