How can I fix errors like “Google_IO_Exception” and “Failed to connect”?

Last Updated on April 30, 2017 by Chris Christoff

In this documentation page you’ll find answers for frequently asked questions about Google Analytics Dashboard for WP.

If you have any errors displayed under Google Analytics -> Errors & Debug, you should start by checking these error codes first.

If you can’t find the right answer, go to WordPress.org support forums and drop a question there. Try to give as many details as possible about your issue.

How can I fix errors like “Google_IO_Exception” and “Failed to connect”?

Your receiving these errors because the server is unable to connect to Google Analytics API. This is a connection issue, so you should contact your hosting provider and ask them to enable / fix outgoing connections through PHP cURL over SSL.

When you have an error similar to this one: Failed to connect to 2404:6800:4006:800::200d: Network is unreachable ask your hosting provider if outgoing connections over IPv6 are supported.

If IPv6 is not supported you’ll need PHP 5.3+ with cURL 7.10.8+ to be able to force connections over IPv4 in Google Analytics Dashboard for WP.

To force IPv4 add the following lines into your wp-config.php file:

/** GADWP force Internet Protocol version */
define('GADWP_IP_VERSION', 1);