Connect Google Analytics Account Not Working

I’ve tried connecting and it’s just not working… UPDATE BELOW*

I’ve followed these instructions (which seems they need to be updated a bit):Create Google Analytics Client ID and Secret Client - MainWP Documentation

I’ve tried starting over with the Google API Console. I started in Chrome and then tried in Firefox but nothing is working.

Every time I enter the Account Name (your instructions should mention this can be anything from within MainWP it took me a while to find anything mentioning this), Client ID, and Client Secret then hit Connect Account it opens the normal google app window where it says what it’s asking for “View your Google Analytics data” in this case, I click “Allow” and it brings me back to the “Connect Google Account” again. It’s like it’s a big loop that goes nowhere.


After typing the above and trying to get it to work somehow I stumbled upon something.

After you add your account it should re-route you to the “Manage Accounts” Tab vs. back to the “Visitor Data” Tab, the visitor data tab as this point still is blank and says “connect” so it completely throws you off. For others having this issue, make sure to check the “Manage Accounts” tab to see if you have the greenlight it connected, then make sure to follow the instructions below in this particular order, it will save you time.

This page should just go to straight to this page and after the 1st step in the Table of Contents, you should link or possibly just have the instructions from this page as contents #2. Then push the current #2 contents as contents #3.

The biggest thing for me was being re-routed back to the page where I’m still getting the “connect” button so it completely threw me off. Had it routed me to the “Manage Accounts” page and shown me that it did in fact connect, I would have been up and running hours ago, but there was no feedback saying your good so it made setting this up super confusing.

Hopefully, anyone who stumbles across this, it helps you save some time.

@Admins, a couple of suggestions:

  • After you add your account have it re-route you to the “Manage Accounts” Tab to see if the account connected. Being re-rounted to the page where it still says “connect” make it look like it didn’t connect.

  • On the “Create Google Analytics Client ID and Secret Client” it’s not clear if you have to use the URL or not. If you do, why or can you use another URL here? I’d explain what you need to use here.

  • Update the MainWP “Account Name” from the Google Analytics set page to say “Account Name (can be any name)” or something like this I probably spent 30+ mins just trying to figure out what it needed to be, but just using “Account Name” make it seem like it need to be something specific.

Hi Solomon,

Thanks for reaching out and for your suggestions. We will look into this as soon as possible.

Regarding the process of connecting your account, can you please tell me do you use GA 3 or GA 4 at the moment?

Hi Bogdan, I’m not sure actually? I’m guessing 3, I’m using tag manager to add it to my sites but if I look at the tracking code from within GA it says this: “”

I’m using the SG optimizer on most of my sites as well so the scripts are combined but I just checked another one of my sites it’s loading the analytics.js so I’m not actually sure.

A quick search to help determine what version I’m using hasn’t yielded any conclusive findings either.

Do you know a quick way to determine this?


Hi Solomon,

I am not sure what could be causing this problem.

Would you mind opening a private Help Desk ticket so we can collect some additional information & investigate further?

Hi Bogdan, I’m not sure what an open ticket would do, I’ve got analytics working from within the dashboard now.

The main problem I was having was when adding the credentials I’d click the connect button it would re-route me back to the visitor data tab which would still say connect account, or something along those lines, so it made it seem that my GA account wasn’t connected.

My confusion was more a user flow issue vs. a technical issue, I think. After you add your GA account it’s not very clear that there is another step to get data to show up from within the visitor data tab. I believe when you click the button there, it takes you back to the add account tab, and the fields are blank so it looks as if something didn’t work, I think I did this 4-5 times before I realized the GA account was actually connected from within the manage account tab. I understand the fields are blank in the add account tab because you can have multiple GA accounts, and so that makes sense but there is no feedback or indication from that tab saying you have X number of GA accounts connected so that’s where my confusion came from, I’d suspect others have that same issue, but, maybe I’m the only one who is clueless, haha.

Anyway, I believe from a user perspective any future confusion could be cleared up with minimal rework of the guides and (possibly a bit more work) to make sure the user has proper feedback when the connect button is clicked.

If I get some time, I can deactivate the account and do it again to show the user flow, but at the moment I’m unable to do that.

If I missed something in regards to needing a ticket open for other reasons, I’m happy to open one, but with the analytics not working originally, I made a note with the Update saying that I actually got it working.

Let me know if there’s something further you want from a ticket and I’ll get it open.

Thanks, Bogda, talk soon.

Solomon, I was having similar issues but your solution in your first post helped me.


Hi @TrustedSamurai I’m glad it helped you, I’m hoping you found it before you spent an exorbitant amount of time getting analytics hooked up, glad it’s helped someone so far.

And thank you for letting me know. Hope you and your family are well, safe, and enjoying the holidays in these crazy times.

Take care,

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.