Why “Error occurred while connecting to Google” during Google Analytics install
Sometime you get this error …
“Unfortunately, an error occurred while connecting to Google, please try again:”
during the installation of “Google Analytics for WordPress” plugin by Yoast.
Assuming that you do have good internet connection and Google Analytics is up, one common reason is that you are currently logged into another Google account in the same browser. And that other Google account has not signed up for Google Analytics.
The solution is to sign out of all other Google accounts if you have browser tabs open with them. Then open a new browser window to log into your Google Analytics account. Click that “Re-authenticate with Google” button.