Opinions about designing, programming and using software

WordPress Google Analyticator error “Analytics API service error 0:Error fetching OAuth2 access token”

A couple of years ago I wrote about trying Google Analyticator for WordPress.  I’m still using that plug-in, but recently I noticed that its dashboard widget wasn’t working.  Instead, I was getting the error:

Google Analytics UID: There was an Analytics API service error 400:Error fetching OAuth2 access token, message: ‘invalid_grant’

I found that others were having the same problem.  I continued my search and found a post from WordPress forum user rhenderson813 stating that Google Analytics has added a requirement for an authentication code.

I had already upgraded Google Analyticator to the most recent version, so I went to Settings -> Google Analytics in my WordPress admin panel.  Rather than display the settings that I expected, I got a page entitled “Activate Google Analyticator”.  Here are the steps that I followed.

  1. Right below the text “You need to sign in to Google and grant this plugin access to your Google Analytics account”, I clicked on the “Click here” link.
  2. That popped up a window from Google which asked me to log into my Analytics account.  I did so.
  3. Next it displayed “Google Analyticator for WordPress is requesting permission to: View your Google Analytics data”
  4. I clicked on “Allow Access”.
  5. The pop-up presented new information that said “Please copy this code, switch to your application and paste it there:”, followed by a field with an alphanumeric code.
  6. I copied this code, went back to the WordPress dashboard, and pasted it into the blank field next to the “Save & Continue” button.
  7. I clicked on “Save & Continue”.

Finally the dashboard widget came back to life and I could see the stats from Google Analytics again.

Post a Comment

Your email is kept private. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>