When something goes wrong, Analytics Insights will report an error in your WordPress Administration screen. Some of these errors are automatically handled and corrected, while others will need manual action.
These errors can be split into two main categories. Generic errors are presented as negative values, which are usually displayed in your reports, and the second category of more descriptive errors, reported by Google Analytics API, which can be found in your WordPress admin menu under Analytics Insights -> Errors & Debug. In addition to these errors, there are a few others, also covered on this documentation page.
Generic error codes
The following errors can be encountered while viewing your analytics reports on the dashboard widget, frontend widget, post’s reports, or page’s reports.
This is rather a notice than an error, it indicates that not enough data was collected for a report to be generated and displayed. It occurs when the response for a report request comes back empty. This notice is usually accompanied by a Not enough data collected message.
This error indicates that a problem was encountered while retrieving your reports. You should check Analytics Insights -> Errors & Debug screen for more details.
This error indicates that not all the requirements are met in order to properly retrieve a report. In this case, you should clear the authorization, authorize it again and check the configuration. Checking your PHP error log could also help.
Well, this error is for those who are not playing fair; it’s thrown when a security check is not met. If you are one of the good guys, emptying the page cache should solve this issue.
This error occurs when the user doesn’t have the necessary permissions to view the requested report. On a properly configured plugin, it’s hard to get this error, but it may happen under certain circumstances.
This error is thrown in the sidebar/frontend widget. When the plugin fails to get the widget options will throw this error. This prevents the widget to display sensitive analytics data to guests or crafted requests.
Google Analytics API error codes
These errors can be found under Analytics Insights -> Errors & Debug in your WordPress admin menu. Last Error will give you a full description of the error while Error details will report the error code, the domain, the reason for the error, and a short message.
Array( [0] => 403 [1] => Array( [0] => Array( [domain] => global [reason] => countryBlocked [message] => This service is not available from your region ) ) )
In the above example, the error code is 403, the reason is countryBlocked and the message is This service is not available from your region.
The BAD_REQUEST (400) error is thrown when the plugin is configured or used incorrectly. Here are some of the most common reasons:
- invalidParameter
- badRequest
- keyExpired
To fix these errors make sure you’re always using the latest version of the plugin. Also, check your PHP error log for related issues.
The UNAUTHORIZED (401) error indicates a credential issue. Here are some of the most common reasons:
- invalidCredentials
- authError
- required
You will have to clear the authorization (if it wasn’t cleared automatically) and authorize the plugin again to fix these errors. You can clear the authorization from Analytics Insights -> General Settings screen.
The FORBIDDEN (403) error indicates a permission issue, including quota limits. Here is a list with common reasons:
- insufficientPermissions: This is a permission issue, you should check if you have permissions to get access to the View you’re trying to display reports for. In addition, if you also have an User does not have any Google Analytics account message, you’ll have to create a Google Analytics account and a Property with a View, see this tutorial.
- dailyLimitExceeded: You’re exceeding the 10.000 requests/view/day limit. This error will be automatically cleared at midnight PST, trying to clear it manually it’s useless.
- userRateLimitExceeded: You’re exceeding the limit of 10 requests/second/user. Check your configuration, you may have to decrease the rate at which requests are made.
- countryBlocked: Check with your hosting provider if Google Analytics service is available in the country where your server is located. If it’s available, your hosting provider or you should report the issue here.
- quotaExceeded: You’re exceeding the limit of 10 requests/second/view. Check your configuration, you may have to decrease the rate at which requests are made.
FAQ about Analytics Insights for WP
Here is a list of answers to frequently asked questions about this plugin.