Thanks. I had the same issue, but this was the solution.
In case it helps someone, I think the confusion comes from the term “account”. Until now, I thought that “account” was referring to my Google account, but in fact, it refers to a Google Analytics Account. Under your Google account, you can have several Analytics accounts, each with several properties. See the screenshot below:
I believe the key is to have one service account per Analytics account. In my case, one service account is able to pick all properties inside that Analytics account. But if you have more than one Analytics account under your Google Account, then you need to create 1 service account per Analytics account.
It’s a little confusing to understand at first because of the similar naming, but once you get it, it works.
I seem to be having the same issue. I’m using one JSON file and one service account. MainWP Google Analytics appears to only allow one service account. If I create a new JSON file/key and upload it, it replaces the existing one. All of my sites can be connected under the settings menu but when I go to view Visitor Data, only one of my sites is showing data. Did you get this resolved?
I tried that too. It doesn’t work. You have to create another service account and json file for that service account. Then link the email address of that service account to ONE analytics property. (And repeat)
@curtis you are correct! You do have to create a new Service account and JSON key and upload it as a new account. that new email needs to be added to a unique GA property. Unfortunate process for having dozens of GA accounts, but it does seem to be working now. Thanks, all!
We will perform additional testing and verify that having multiple Analytics Accounts in the Google Analytics Dashboard, requires multiple Service Accounts.
We will update this thread with findings and update the documentation as needed.
That does not work for clients. Each client has their own account for their analytics. Some I created and manage and some they created and manage on their own.
No, I have not. The issue seems to be stemming from the fact that this will only access one account, which can access any of the properties you add the Service Accounts email to, or all of the properties if you add the email to the root account. This does not work across different accounts.
The issue comes in that each Service Account requires a different key to be created and MainWP only allows 1 key file to be uploaded. This I feel is not a plausible solution to obtain Google Analytics from each of the client’s accounts.
When I connected the first account, it received data
When I connected the second account, the second received data, but the first one stopped receiving
Widget data and report data are also empty in the first account, after I connected the second
We need a solution for this, I have 100 clients and nothing about GA works after the update.
Also we need a clear doc about how to add multiple accounts. One or multiple OAuths? One or multiple Services? What happens if we have 100 properties in 2-3 different GA Master accounts? We have to add them separately?
Please provide clear instructions. Don’t let us guess and try to figure this out on our own.
I was under the impression that I only needed one Service Account that would access the View data from any GA4 account the email address was attached to. I did realize I needed to create a Service Account for each GA4 account. I also assumed that I was only able to upload just one JSON file.
I’m good to go now. Issue SOLVED!
I created a new Service Account email
Generated the key in this new Service Account and downloaded the JSON file
Uploaded it to MainWP
I replaced the first Service Account email address with the new Service Account email address in the second GA4 Analytics account and the data for the second site is pulling in just fine.
We believe we’ve identified an issue with the extension which was causing the inability to see the data of the properties of the Analytics Accounts which you are not the owner of.
We’ve prepared a version with a fix for this. In our testing, we can now see the property data of all Analytics Accounts.
This means that creating a separate Service Account for each Analytics Account will no longer be necessary.
After you install this version, go to the extension settings, re-save the settings, and refresh data.
If that doesn’t connect all properties, try re-uploading the JSON Key file.
Alongside that, you will have to add the Service Account email (from a single Service Account!) as a Viewer to all properties.