I managed to follow all the steps in the documentation, but I encountered a fatal error:
Ένα σφάλμα τύπου E_ERROR εντοπίστηκε στη γραμμή 267 του αρχείου /home/www//wp-content/plugins/mainwp-google-analytics-extension/lib/php-analytics-admin/vendor/google/gax/src/ApiException.php](http:///wp-content/plugins/mainwp-google-analytics-extension/lib/php-analytics-admin/vendor/google/gax/src/ApiException.php). Κωδικός σφάλματος: Uncaught Google\ApiCore\ApiException: {
“reason”: “SERVICE_DISABLED”,
“domain”: “googleapis.com”,
“errorInfoMetadata”: {
“consumer”: "projects/57156236*",
“service”: “analyticsadmin.googleapis.com”
},
“message”: “Google Analytics Admin API has not been used in project 57156236*** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com/overview?project=57156236*** then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.”,
“code”: 7,
“status”: “PERMISSION_DENIED”,
“details”: [
{
“@type”: “type.googleapis.com/google.rpc.Help”,
“links”: [
{
“description”: “Google developers console API activation”,
“url”: “https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com/overview?project=57156236***”
}
Also I delete the plugin and reactivated and the 2 buttons bellow is doing nothing when I press them.
Just for note, I am not sure why the Google GA API library does not process incorrect files in a more user-friendly way. But we are checking if something on our end can be done to prevent this.
No, even if I delete the plugin, some things still don’t work properly. For example, the “Sync Dashboard with Sites” is not clickable. Only after restoring it, everything works fine.
I just restore again
It resolves the error caused by uploading the incorrect JSON Key file. You should now be able to load the Google Analytics page on your MainWP Dashboard and remove accounts.
We have also added a check which will look for incompatible JSON Key file and reject the upload if found.
You can multiple Google Analytics accounts to the extension, and each Google Analytics account can multiple websites.
After you add GA accounts to the extension via JSON Key files, you need to assign a Google Analytics property to a child site. You can find more information in the help document: Google Analytics Extension - MainWP Documentation
I’m not receiving an error, but I am only able to receive just one child site’s data.
Setting up this OAuth & Service Account appears to be working because I am receiving data from one of the 3 sites I connected to MainWP. However, this one site is the only one showing data from the 3 sites I linked to MainWP.
I have added the Service Account email to all 3 GA4 accounts as a viewer, see below and these sites are showing up in the Visitor Data dropdown as well as when I connect the GA4 account to the child site edit.
Below are all the API, GA4, and MainWP screenshots.