Problem Authorizing Google Analytics

This topic contains 9 replies, has 2 voices, and was last updated by  Guust 8 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #166812

    adyp
    Expired Member
    Post count: 496

    Hi,

    I have followed the step by step instructions (and watched the video), but when I get to the stage of pressing the Authorize button, the window that opens displays a Google 401 error (see attached screenshot).

    I tried doing through the process to set it up again, with same result. This was all a couple of weeks ago and I have waited until I had the cash to renew my GD membership and update all addons in case this was having an effect – renewed and updated today, but the problem is still there.

    (Google analytics appears to be working ok for website as a whole after dropping GA code into Header.php.)

    login credentials to follow …

    #166814

    adyp
    Expired Member
    Post count: 496
    This reply has been marked as private.
    #167272

    Guust
    Moderator
    Post count: 29970

    Have a look at the end of your client ID. You copied and pasted too much of the Client ID.

    #167307

    adyp
    Expired Member
    Post count: 496

    Thanks Guust,

    I deleted the end (.apps.googleusercontent.com) at the end and re-pasted it.

    Pressing authorize now opens up the window as shown in the tutorial, but when I press the Allow button I get a message: Something went wrong – #2

    I turned off Wordfence in case this was having an effect and re-tried – same message (so Wordfence back on).

    Have you come across this before?

    – I am off to bed now, will check in in the morning …

    #167317

    Guust
    Moderator
    Post count: 29970

    Your Client ID still was xxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com instead of xxxxxxxxxxxxxxxxxxxx.
    You have to save the change before trying to authorize. Try again.

    #167594

    adyp
    Expired Member
    Post count: 496

    Thanks Guust,

    I think my confusion arose from the Geodirectory Google Analytics tutorial, step 6:

    Click Create and you should then be able to copy and paste the Client ID to your settings page, for example:
    12345654321-12343x2x34x5xx4x32xx12x3.apps.googleusercontent.com

    This might be altered to avoid confusion for others?

    I will try it when I have resolved my current white screen issue (unresponsive/dead website – raised on another ticket!)

    Adrian

    #168074

    Guust
    Moderator
    Post count: 29970

    OOOOOOPS, my mistake, that is actually correct, so there must be some other error.

    I suggest you check step 5.1:
    Note: match it exactly to the URL of you site, so if your site does not use WWW, leave it out.

    #168109

    adyp
    Expired Member
    Post count: 496

    OK – I have got it working (hooray!)

    Some things to note though:

    1. I went back to step 5.1 as you suggested, and noticed that when generating (and then copying) the client ID and Secret (using the official ‘copy’ buttons), extra spaces were being generated/copied – a leading and trailing space for the ID and a trailing space for the secret! The spaces can be seen when you paste the ID, but not the secret (it’s just a line of dots) – so I had to paste via a text window to delete the space, then into the GD box. No idea if it was a problem, or if I had just not created the ID/Secret using the correct URLs before.

    2. When I tried viewing analytics for a listing it came up with an error message, suggesting that I enable analytics by visiting https://console.developers.google.com/apis/api/analytics/overview?xxxxxxxxxxxxxxxxx
    I did this and hey-presto, working. This suggests that a final step might be added to your tutorial?

    Anyway, thanks Gust!

    #168110

    adyp
    Expired Member
    Post count: 496

    … sorry, dropped a u – thanks Guust!

    #168306

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂 and thanks for letting us know.

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount