Don't allow users to attempt setup if their site can't communicate with the Site Kit or Google services
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 383
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 80
Description
## Bug Description
At present we perform some [compatibility checks](https://github.com/google/site-kit-wp/blob/b9c61b60102122e6a661c014bfd9fdb8312af64a/assets/js/components/setup/CompatibilityChecks/checks.js#L27) (see #1549) for users looking to set up Site Kit. Some of the errors appear as below (see the screenshots tab also).
- google_api_connection_fail ([GH](https://github.com/google/site-kit-wp/blob/b9c61b60102122e6a661c014bfd9fdb8312af64a/assets/js/components/setup/CompatibilityChecks/constants.js#L23) | [Documentation](https://sitekit.withgoogle.com/documentation/troubleshooting/setup/#google_api_connection_fail))
- google_sk_service_connection_fail ([GH](https://github.com/google/site-kit-wp/blob/b9c61b60102122e6a661c014bfd9fdb8312af64a/assets/js/components/setup/CompatibilityChecks/constants.js#L23) | No documentation)
- amp_cdn_restricted ([GH](https://github.com/google/site-kit-wp/blob/b9c61b60102122e6a661c014bfd9fdb8312af64a/assets/js/components/setup/CompatibilityChecks/constants.js#L20C1-L20C1) | [Documentation](https://sitekit.withgoogle.com/documentation/troubleshooting/setup/#amp-cdn-restricted))
For users who encounter these errors, there isn't always a "Get Help", with users likely to go ahead and attempt set up anyway, with the green "Sign in with Google" CTA as the only highlighted option. When doing so, they may encounter further errors (not neccessarily the same as on the compatibility check).

To improve the behavior for users who run into compatibility issues, consider one or more of the following:
1. Don't allow them to click on the "Sign in with Google button" if we're aware users won't be able to complete set up
2. Add a learn more link in place of the "Sign in with Google" button, directing them to the related guide (A separate "Learn more" link does exist for some compatibility checks - see screenshots
3. Ensure all compatibility check notices include a learn more link
## Steps to reproduce
1. Attempt Site Kit setup from a region where Google services (or AMP) have restrictions
2. Notice the compatibility check warning
## Screenshots
google_api_connection_file error, with no "Learn more" or "Get Help" link. Proceeding leads to a `request_failed error` with a "Get Help" link

Your site may not be ready for Site Kit error, with a "Get help" link. Setup may sometimes proceed successfully, depending on the REST limitations.

Looks like the AMP CDN is restricted in your region error, with a "Get help" link

## Additional Context
- Site Kit 1.115.0
- Discussed in support eng sync ([link](https://docs.google.com/document/d/1Dz-IVEo0TAv-FUY8ers0gB10qS0N6_s2ToMN4_u2Sj0/edit#bookmark=id.evwpq6o7jc0j))
- I'm happy to go through all potential compatibility checks and how they appear for users if we decide to include a learn more link for each.
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
*
## Implementation Brief
* [ ]
### Test Coverage
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Assessment
This issue has not been assessed yet.